将PDF页面导出到图像 [英] Export PDF Page into image

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

问题描述



我想将PDF页面导出到图像中.有人可以建议我如何使用C#.net

在此先感谢,
Bharath

Hi,

I want to export PDF Page into image. Can anybody suggest me how can I achive with C#.net

Thanks in Advance,
Bharath

推荐答案

与答案类似的问题
如何转换PDF,Word,Excel到C#.NET中的jpg [
Similar question with answer
How to convert PDF,Word,Excel to jpg in C#.NET[^]


此组件将页面光栅化为位图.然后您可以将其转换为其他图像格式.

http://code.google.com/p/mupdf-converter/feeds [ ^ ]

示例:

This component rasterize the page to bitmap. Then you can convert it to other image format.

http://code.google.com/p/mupdf-converter/feeds[^]

Example:

int page = 1;
int dpi = 200;
MuPDFLib.RenderType RenderType = RenderType.RGB;
bool rotateAuto = true;
string file = @"C:\test.pdf";
string password = ""; 

MuPDFLib.MuPDF pdfDoc = new MuPDFLib.MuPDF(file, password);

pdfDoc.Page = page;
if (picPDF.Image != null)
    picPDF.Image.Dispose();
Bitmap bm = pdfDoc.GetBitmap(0, 0, dpi, dpi, 0, RenderType,
                             rotateAuto, false, 0);
                
pdfDoc.Dispose();




尝试检查以下链接:
http://stackoverflow.com/questions/1642280/jpg-to-pdf- convertor-in-c-sharp [ ^ ]

http://stackoverflow.com/questions/711942/convert-pdf-file- to-jpg-asp-net [ ^ ]

问候
罗伯特
Hi,

try to check following links:
http://stackoverflow.com/questions/1642280/jpg-to-pdf-convertor-in-c-sharp[^]

http://stackoverflow.com/questions/711942/convert-pdf-file-to-jpg-asp-net[^]

Regards
Robert


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

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