Permission problem when call htmltools from C#, or VB.net exe

Hi Very PDF,

We do not have a problem running from the command line; however certain parameters do not work when run from a vb.net exe.

We change an htm file to a pdf file as follows:

The following did not work from the exe

* Dim htmltool As Process = Process.Start("htmltools.exe",
"-pageheight 1050 -margin 100x140x100x140 " & htmFileName & " " &
pdfFileName)

The return value was -4 (Can't locate specify printer in this computer)

The following did work from the exe:

* Dim htmltool As Process = Process.Start("htmltools.exe", "-htm2pdf2
" & htmFileName & " " & pdfFileName)

Both commands work from the command line.

Can you help?
Customer

--------------------------------------------

This problem is caused by permission limitation in SYSTEM user account, please arrange your C# code run inside an administrator user account instead of default SYSTEM user account, this problem will be solved.
Please refer to following web pages for more information,
https://www.verypdf.com/wordpress/201305/access-is-denied-when-call-htmltools-exe-application-from-c-source-code-36712.html
https://www.verypdf.com/wordpress/201301/how-to-call-htmltools-from-tomcat-service-application-34025.html
https://www.verypdf.com/wordpress/201201/how-to-call-doc2any-exe-or-htmltools-exe-from-a-service-20896.html
https://www.verypdf.com/wordpress/201110/convert-html-to-pdf-from-aspx-program-language-8163.html
https://www.verypdf.com/htmltools/callfromcsharp.html
https://www.verypdf.com/wordpress/201108/how-do-i-convert-html-to-pdf-from-system-service-account-2243.html
https://www.verypdf.com/wordpress/201108/htmltools-exe-permission-problems-when-call-from-asp-net-source-code-1893.html

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!