pdf图像问题

我正在尝试使用以下链接转换pdftoimage http://threebit.net/mail-archive/itext-questions/msg00436.html

但我得到这个错误如何让这个代码工作? “无法找到类型或命名空间名称’PdfDecoder’”正在寻找开源。

这个ghostscript dint在服务器上工作, http://www.codeproject.com/KB/webforms/aspnetpdfviewer.aspx

帮我。

你可以尝试这个…..

pdfDoc = (Acrobat.CAcroPDDoc) Microsoft.VisualBasic.Interaction.CreateObject("Ac roExch.PDDoc", ""); int ret = pdfDoc.Open(inputFile); if (ret == 0) { throw new FileNotFoundException(); } // Get the number of pages (to be used later if you wanted to store that information) int pageCount = pdfDoc.GetNumPages(); // Get the first page pdfPage = (Acrobat.CAcroPDPage)pdfDoc.AcquirePage(0); pdfPoint = (Acrobat.CAcroPoint)pdfPage.GetSize(); pdfRect = (Acrobat.CAcroRect) Microsoft.VisualBasic.Interaction.CreateObject("Ac roExch.Rect", ""); pdfRect.Left = 0; pdfRect.right = pdfPoint.x; pdfRect.Top = 0; pdfRect.bottom = pdfPoint.y; // Render to clipboard, scaled by 100 percent (ie. original size) // Even though we want a smaller image, better for us to scale in .NET // than Acrobat as it would greek out small text pdfPage.CopyToClipboard(pdfRect, 0, 0, 100); IDataObject clipboardData = Clipboard.GetDataObject(); if (clipboardData.GetDataPresent(DataFormats.Bitmap)) { Bitmap pdfBitmap = (Bitmap)clipboardData.GetData(DataFormats.Bitmap); } 

请看一下这个链接了解更多信息

你也可以尝试这个

  SautinSoft.PdfFocus f = new SautinSoft.PdfFocus(); f.ConvertPdfToImage(@"c:\sample.pdf", @"c:\pages\", SautinSoft.PdfFocus.eImageFormat.Jpeg, 200); 

请通过此链接获取更多信息