winnovative html to pdf converter [英] winnovative html to pdf converter

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

问题描述

大家好,

我使用winnovative软件从html生成pdf文件的一个aspx页面。

自8个月起它工作正常..不知道突然间它生成缓慢,无法从图像文件夹中取出图像。任何知道的人都可以尽快帮忙。解决这样的问题...

Hi everyone,
I have one aspx page for generation pdf file from html using winnovative software.
It was working fine since 8 months..Dont know suddenly it is generating slowly and unable to take image from images folder..Can anyone who knows please help soon..Code something like this...

PdfConverter pdfConverter = new PdfConverter();
pdfConverter.PdfDocumentOptions.ShowHeader = false;
 pdfConverter.PdfDocumentOptions.ShowFooter = false;
pdfConverter.ActiveXEnabled = true;
pdfConverter.AvoidImageBreak = true;
 pdfConverter.NavigationTimeout = 2147483647;
 pdfConverter.ScriptsEnabled = true;
 byte[] pdfBytes = pdfConverter.GetPdfBytesFromHtmlString(strBody);

推荐答案

这是迄今为止我用过的最好的





[来自谷歌]



这是一些代码(vb.net)

'要打印的页面的网址

fileToPrintURL =www.somesite.com/pagename

'这将是文件名.pdf生成一个

Dim filename As String =Page+ TimeOfDay.Ticks.ToString()+。pdf

'共享文件夹,具有写入权限和文件名,将在哪个地方生成

Dim filenameWithSharedPAth As String = Common.PDFSharedFolder + filename

'创建一个进程对象

昏暗进程为新进程

'设置一些初始值

process.StartInfo.UseShellExecute = False

process.StartInfo.CreateNoWindow = True

'现在路径从上面的链接下载的exe

process.StartInfo.FileName = Server.MapPath(〜/ bin / PrintPDF /)+wkhtmltopdf.exe

'和一些参数(基于req)因为我需要从认证中传递它所以用户名和密码

process.StartInfo.Arguments = - username+ username + - password+ password ++ fileToPrintURL +++ filenameWithSharedPAth +

'再次设置一些

process.StartInfo.RedirectStandardOutput =真的

process.StartInfo.RedirectStandardError = True

'开始流程

process.Start()

'结束流程

process.WaitForExit()
This is the best i had ever used till now


[from google]

Here is some code(vb.net)
‘url of the page to be printed
fileToPrintURL = "www.somesite.com/pagename"
‘this will be the name of the file ".pdf" generated one
Dim filename As String = "Page" + TimeOfDay.Ticks.ToString() + ".pdf"
‘shared folder with write permissions and file name to be generated at which place
Dim filenameWithSharedPAth As String = Common.PDFSharedFolder + filename
‘create an object of process
Dim process As New Process
‘set some initails
process.StartInfo.UseShellExecute = False
process.StartInfo.CreateNoWindow = True
‘now the path of the exe downloaded from the link above
process.StartInfo.FileName = Server.MapPath("~/bin/PrintPDF/") + "wkhtmltopdf.exe"
‘and some arguments (based on req) as I need to pass it from authentication so user name and password
process.StartInfo.Arguments = "--username " + username + " --password " + password + " """ + fileToPrintURL + """ " + """" + filenameWithSharedPAth + """"
‘again some setting
process.StartInfo.RedirectStandardOutput = True
process.StartInfo.RedirectStandardError = True
‘start the process
process.Start()
‘end the process
process.WaitForExit()


这篇关于winnovative html to pdf converter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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