PDF图像问题 [英] pdf to image issues

查看:364
本文介绍了PDF图像问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试使用下面的链接
的http:/ /threebit.net/mail-archive/itext-questions/msg00436.html

am trying to convert pdftoimage using the below link http://threebit.net/mail-archive/itext-questions/msg00436.html

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

but i get this error how to get this code to work ? "The type or namespace name 'PdfDecoder' could not be found" am looking for open source .

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

this ghostscript dint work on server , http://www.codeproject.com/KB/webforms/aspnetpdfviewer.aspx

帮我。

推荐答案

您可以试试这.....

you Can try this.....

 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);



请通过此链接的详情

这篇关于PDF图像问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆