Page 1 of 1

Duplex printing not working consistently

Posted: Thu Jun 30, 2016 4:11 pm
by Peter5555
I use the following code to print PDF in duplex mode. It works OK for our in-house printer which is "HP LaserJet M3035 MFP". However it does not work for printer "HP Color LaserJet M855" at our client's site. Here is the code:

Dim iActiveDocID As Integer
AxCoPDFXCview1.OpenDocument(strFileName, "", iActiveDocID, 0)
AxCoPDFXCview1.GetActiveDocument(iActiveDocID)
AxCoPDFXCview1.SetProperty("Print.Duplex", 1, 0)
AxCoPDFXCview1.PrintDocument(iActiveDocID, PDFXCviewAxLib.PXCVA_Flags.PXCVA_NoUI)

PDF-XChange Viewer ActiveX SDK version: 2.5.317
Visual Studio Version: 2012

Thanks for any advice.

Peter

Re: Duplex printing not working consistently

Posted: Wed Jul 06, 2016 10:58 pm
by Vasyl-Tracker Dev Team
Hi Peter.

I'm afraid that it is hard to say what is wrong in case with HP Color LaserJet M855 printer because we have not such device for testing...

Some additional questions:

1. this printer supports the duplex printing definitely?
2. what is paper size/orientation in current printer's settings?
3. please check if duplex feature is installed and present exactly. For example for my HP LaserJet P2055dn:

Image

HTH.

Re: Duplex printing not working consistently

Posted: Thu Jul 07, 2016 12:34 pm
by Peter5555
Thanks for the reply.

The printer is definitely configured for duplex printing. We always use the normal printing paper size (letter 8.5 x 11). The printer is shared so I cannot set it to duplex at the printer. That is why we want to buy your components so we can control it from application. If a document needs to be printed in duplex, application will set it and send it to the printer. The code I posted in my initial post is working with our own printer. Did you look over my code? Did I miss anything?

Thanks!

Peter

Re: Duplex printing not working consistently

Posted: Thu Jul 07, 2016 5:15 pm
by Vasyl-Tracker Dev Team
Hi Peter.

Your code looks good. Currently we have no idea why its not working with "HP Color LaserJet M855"..

Can you try our PDF-XChange Viewer application on client's side (you may easily launch the existing PDFXCview.exe) to print with duplex option enabled? Just like regular end-user, by setting this option for that printer on Print dialog..
Its good to know if this problem is reproducible with our EU-application too or its only problem with our SDK..

Thanks, and
Best
Regards.

Re: Duplex printing not working consistently

Posted: Thu Jul 07, 2016 5:56 pm
by Peter5555
That is very good idea. Why did I not think of that. I will try it and let you know.

Thanks for your help!

Peter

Re: Duplex printing not working consistently

Posted: Thu Jul 07, 2016 10:05 pm
by Will - Tracker Supp
Keep us posted!

Re: Duplex printing not working consistently

Posted: Wed Jul 20, 2016 8:20 pm
by Peter5555
I was switched to another project until today.

I almost immediately found out what's wrong using PDFXCView.exe as debug tool. It is the printer driver. For some reason, PDFXCView.exe and ActiveX component in my own app cannot see the duplex settings in the existing driver. However, other programs like Excel and Words can print duplex without any problem. On PDFXCView.exe print settings, duplex is grayed out. I guess the duplex setting is just getting ignored in my own app.

So I downloaded a HP universal printer driver and setup another logic printer pointing to the same physical printer. Now both PDFXCview.exe and my own program can print duplex.

I really like your ActiveX components. It is capable and easy to code.

Thanks for your help!

Re: Duplex printing not working consistently

Posted: Wed Jul 20, 2016 8:27 pm
by Paul - Tracker Supp
:D

Re: Duplex printing not working consistently

Posted: Wed Sep 14, 2016 8:22 am
by jon albert
[color=#000000]Pet[/color][/url][url=http://www.traguspiercing.xyz/][color=#000000]er5555[/color] wrote:I use the following code to print PDF in duplex mode. It works OK for our in-house printer which is "HP LaserJet M3035 MFP". However it does not work for printer "HP Color LaserJet M855" at our client's site. Here is the code:

Dim iActiveDocID As Integer
AxCoPDFXCview1.OpenDocument(strFileName, "", iActiveDocID, 0)
AxCoPDFXCview1.GetActiveDocument(iActiveDocID)
AxCoPDFXCview1.SetProperty("Print.Duplex", 1, 0)
AxCoPDFXCview1.PrintDocument(iActiveDocID, PDFXCviewAxLib.PXCVA_Flags.PXCVA_NoUI)

PDF-XChange Viewer ActiveX SDK version: 2.5.317
Visual Studio Version: 2012

Thanks for any advice.

Peter
I am also having trouble and tried aforementione method but i did not fix.

Re: Duplex printing not working consistently

Posted: Wed Sep 14, 2016 10:50 pm
by Vasyl-Tracker Dev Team
Hi Jon.

Can you check if the changing the 'Duplex' field on Viewer's Print dialogue working or not too with your printer?

Thanks.