PDF.Convert.ToXod exception with PDFTron PDFNet on ASP.NET application

306 views
Skip to first unread message

Gilles Barrioz

unread,
Nov 21, 2013, 10:16:32 AM11/21/13
to pdfne...@googlegroups.com
Hi
i try to integrate a pdftron.PDF.Convert.ToXod (PDFNET.DLL V6.1.0.21657) call in a ASP.NET web page (in a 32 bits application)

It works correctly when i publish on IIS on my computer (windows 7 64 bits with MS Office)
I try to deploy on a IIS server on Windows 2008 R2 server 64 bits but without MS Office. I've installed the "PDFTron PDFNet" printer with pdfnetDrivers 64 bits.

I run my converstion under impersonnalisation (with a local admin account) and i always have:

Exception:
Message: An error occurred while converting the file.
Detailed error:
Unable to set default printer to PDFNet printer
Conditional expression: false
Filename : Convert.cpp
Function : trn::PDF::Convert::ToPdf
Linenumber : 1744

Best regards

Gilles Barrioz

Support

unread,
Nov 21, 2013, 1:22:29 PM11/21/13
to pdfne...@googlegroups.com
 
It looks like there is a permission issue (i.e. your process does not sufficient rights).
As the message says, SetDefaultPrinter() is returning 0.
 
So you can debug this independently from PDFNet.
 
--
Not sure if you saw this article previously:
 
It mainly talks about configuring PDFNet along with MS Office (which we recommend for Office format conversions), so you may need additional permissions for virtual driver processing (e.g. you may need to run under "LOCAL SYSTEM” identity etc).
 
 

On Thursday, November 21, 2013 7:16:32 AM UTC-8, Gilles Barrioz wrote:
Hi
i try to integrate a pdftron.PDF.Convert.ToXod  (PDFNET.DLL V6.1.0.21657) call in a ASP.NET web page (in a 32 bits application)

It works correctly when i publish on IIS on my computer (windows 7 64 bits with MS Office)
I try to deploy on a IIS server on Windows 2008 R2 server 64 bits but  without MS Office. I've installed the "PDFTron PDFNet" printer with pdfnetDrivers 64 bits.

I run my converstion under impersonnalisation (with a local admin account) and i always have:

Exception:
         Message: An error occurred while converting the file.
Detailed error:
        Unable to set default printer to PDFNet printer

Best regards

Gilles Barrioz

Gilles Barrioz

unread,
Nov 27, 2013, 8:07:52 AM11/27/13
to pdfne...@googlegroups.com
it was a impersonnalisation probleme,i solved it by using a external program (console) to make convertion and by running this program with the advapi32 CreateProcessAsUser  (http://support.microsoft.com/kb/889251)

I've also install Micorosft Office (2007 SP2)
Regards
Gilles
Reply all
Reply to author
Forward
0 new messages