简体   繁体   English

如何从头开始在 WPF 中创建 pdf 查看器

[英]How to create a pdf viewer in WPF from scratch

Hi I'm looking forward to create a pdf viewer like the one in the syncfusion library , telerik library , I would like to learn the working of pdf viewer as I don't want to use the third party application in my application.嗨,我期待创建一个 pdf 查看器,就像syncfusion 库telerik 库中的查看器一样,我想了解 Z437175BA4191210EE004E1D937494D09 应用程序中的 Z437175BA4191210EE004E1D94D09 查看器的工作原理。 After some searches realized that we should have to rasterise the pdf doc into image and draw the each image to a frame.经过一些搜索后,我们意识到我们应该将 pdf 文档光栅化为图像并将每个图像绘制到一个框架中。 Is this the correct way to start.这是正确的开始方式吗。 Are there any other ways?还有其他方法吗? please give suggestions请给建议

Thankyou谢谢

I would take a look at this (now archived) project.我会看看这个(现已存档)项目。 It uses the Pdfium rasterizer which is made by Google and is open source and free.它使用谷歌制作的Pdfium rasterizer,开源且免费。 The rest of it is from scratch.它的rest是从零开始的。 It will show you everything you need to use Pdfium for what you're suggesting:它将向您展示使用 Pdfium 完成您所建议的一切所需的一切:

https://github.com/pvginkel/PdfiumViewer https://github.com/pvginkel/PdfiumViewer

As some of the comments alluded, you're not going to realistically be able to make your own renderer from scratch.正如一些评论所暗示的那样,您实际上无法从头开始制作自己的渲染器。 But there's no reason to.但没有理由这样做。 Pdfium is outstanding and interops with C#/WPF perfectly fine. Pdfium 非常出色,与 C#/WPF 的互操作非常好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM