Printing from a 32-bit IIS process on 64-bit Windows

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
ioanaH
Posts: 3
Joined: Wed Feb 22 2012

Printing from a 32-bit IIS process on 64-bit Windows

Post by ioanaH » Wed Feb 22 2012

I'm using Amyuni PDF Converter version 4.0.1.2 to create pdf reports from a webservice deployed on IIS.
Until now we did not have any problems with this webservice on 32bit OS servers.
Recently we've installed the webservice on Windows 2008 R2 SP1 64bit and now the printing just hangs, no error is thrown.
The webservice is running in a dedicated Application pool having "Enable 32bit application" set to True.

Is there a known issue with Amyuni 4.0.1.2 running on Win2008 R2 64bit?

Thanks

Jose
Amyuni Team
Posts: 549
Joined: Tue Oct 01 2002
Contact:

Re: Printing from a 32-bit IIS process on 64-bit Windows

Post by Jose » Thu Mar 22 2012

Hello,

Below is a link to Microsoft KB that explains why you are encountering this issue.
http://support.microsoft.com/default.as ... US;2480118

This issue is occurring because you are printing on 64bit OS and your application is a 32bit application. In this case you can only have one process access the splwow64.exe at a time.

In order to resolve this issue with printing in a 64bit architecture:

1- You will need to migrate to our version v4.5 of the PDF Converter.

2- In your application you will to set the filename and directory location of the resulting PDF document in the DOCINFO’s lpszOutput property and not the SetFileNameOptions() or SetDocFileProps() functions.

Along with suggest above, there were some “fixes” that were recently added to version v4.5 which address your exact issue.


thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite

ioanaH
Posts: 3
Joined: Wed Feb 22 2012

Re: Printing from a 32-bit IIS process on 64-bit Windows

Post by ioanaH » Tue Mar 27 2012

Hello Jose,

Thanks for the reply.

I've build a console application to remove the need to deploy all the code on IIS and used the 4.5 trial version of the PDF Converter to test this, but the problem persists.

>>2- In your application you will to set the filename and directory location of the resulting PDF document in the DOCINFO’s lpszOutput property and not the SetFileNameOptions() or SetDocFileProps() functions.
I'm using the .Net Managed Code Interface, DefaultFileName and FileNameOptions properties of CDIntfControl.
Do I still need to stop using FileNameOptions property?Can you provide more details on what should be done for this in .Net?

Thanks

Jose
Amyuni Team
Posts: 549
Joined: Tue Oct 01 2002
Contact:

Re: Printing from a 32-bit IIS process on 64-bit Windows

Post by Jose » Tue Mar 27 2012

Hi,

Can you send your sample project to support@amyuni.com? I will take a look at it and I will post what I find back on the forum.

Thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite

Jose
Amyuni Team
Posts: 549
Joined: Tue Oct 01 2002
Contact:

Re: Printing from a 32-bit IIS process on 64-bit Windows

Post by Jose » Tue Mar 27 2012

Hello,

Thanks for the sample project, it was very helpful in understanding your issue.

If you are handling events you should be aware that events fired by the PDF Converter behave differently on 32-bit applications running under a 64-bit OS than 32-bit applications running under a 32-bit OSs.

In this scenario (32-bit applications running under a 64-bit OS) the printing happens within a process named SPLWOW64 and this process locks the calling application whenever GDI instructions are issued. This causes the PDF Converter to hang or slow down because the calling application cannot process messages within the same thread when doing GDI calls such as StartDoc. You do not see the issue with other printers because these printers do not send messages to the printing application.

The issue does not happen if broadcasting messages or capturing events is disabled(not used) or if you print to the PDF Converter from a different thread than the one that enabled the message broadcasting.

Hope this helps?
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite

ioanaH
Posts: 3
Joined: Wed Feb 22 2012

Re: Printing from a 32-bit IIS process on 64-bit Windows

Post by ioanaH » Wed Mar 28 2012

Hi,

>>The issue does not happen if broadcasting messages or capturing events is disabled(not used) or if you print to the PDF Converter from a different thread than the one that enabled the message broadcasting.
The only way the print is not hanging is if I removed the capturing event (in my case it was only EnabledPre) and moved the print to a different thread.
If I only moved the print on a different thread, the printing was hanging also on a 32bit OS. (I've used your example(adapted to .Net Managed Code Interface) from this thread http://www.amyuni.com/forum/viewtopic.php?f=2&t=2665)


Thanks

Post Reply