如何将数据从html网页解码为pdf文件 [英] How to decode the data from html webpage to pdf file

查看:86
本文介绍了如何将数据从html网页解码为pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我开发了一个应用程序,将当前的html网页保存为MFC中的pdf文件.它以.pdf格式保存.但是pdf文件无法打开.由于无法正确解码数据,因此无法打开文件.如何解码data.pls帮助我

Hi,I devloped one application to save current html webpage to pdf file in MFC.It is saved as in .pdf format.but that pdf file is not opening.its showing cannot open file because it was not data decoded correctly.how to decode data.pls help me

推荐答案

从代码生成PDF的最简单方法之一就是使用PDF打印机驱动程序.我不知道您现在正在使用什么,但是除非您要进行高级自定义,否则我建议您采用这种方法.
One of the simplest ways to generate PDF from code is to use a PDF printer driver. I don''t know what you are using now, but unless you want advanced customization, I''d recommend this approach.


如Nish所建议,请检查任何打印机,例如PDFCreator [^ ].

在这里您可以使用两种方法:

1.将其用作打印机并简化您的工作.
2.由于它是一个开源项目,因此请查看它使用的代码.

除此之外,您还可以查看CP中的文章:

Pdfizer,C#中的哑HTML到PDF转换器 [使用ASP.NET从HTML页面生成PDF文档 [
As Nish Suggest, check any printer like PDFCreator[^].

Here you can use two approaches:

1. use it as a printer and simplify your job.
2. As it is a opensource project take a look at the code it uses.

Apart from that you can check the articles that are here in CP:

Pdfizer, a dumb HTML to PDF converter, in C#[^]
Generate PDF documents from a HTML page using ASP.NET[^]

HTH!


这篇关于如何将数据从html网页解码为pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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