Blank Pages being printed out on lexmark printer

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

Post Reply
johnpWalsh
User
Posts: 16
Joined: Fri Jan 28, 2011 10:35 am

Blank Pages being printed out on lexmark printer

Post by johnpWalsh » Fri Jan 28, 2011 10:43 am

I am using the demo application PXCView36 and when i print to a lexmark printer only blank pages come out
(the correct number of blank pages come out, i.e. for a 4 page pdf, 4 blank pages come out)
The application works fine on other printers (e.g HP)
Is there any know issues with blank pages being printed out on certain printers, lexmark printers?
thanks

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 14154
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Blank Pages being printed out on lexmark printer

Post by Tracker Supp-Stefan » Fri Jan 28, 2011 1:52 pm

Hello John,

You have posted in the Drivers API forum, but are speaking of the Viewer36 sample.
Please clarify which is the correct one, as I will need to know that before I can ask a specific developer to help.

In any case, if you are testing with the Viewer36 sample, it is based on our Simple dll sdk which was designed to be used primarily for basic rendering of pdf files on the screen inside your application. If you need further tools like e.g. PDF manipulation or better printing handling, you might be better of checking the Viewer AX sdk - the print results there would be much better.

We would also need the exact printer model and drivers used if we need to investigate the issue with this particular lexmark printer.

Best,
Stefan

John - Tracker Supp
Site Admin
Posts: 8205
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Re: Blank Pages being printed out on lexmark printer

Post by John - Tracker Supp » Fri Jan 28, 2011 5:55 pm

and a sample PDF please ... (zipped)

We will then investigate further - also moving this topic to the correct forum.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

johnpWalsh
User
Posts: 16
Joined: Fri Jan 28, 2011 10:35 am

Re: Blank Pages being printed out on lexmark printer

Post by johnpWalsh » Mon Jan 31, 2011 12:30 pm

Hi
Thanks so much for your reply

Firstly apologies for posting to the wrong thread... i was refering to Viewer36 sample i was running so it should have been posted there. Also thank you for moving it too the correct thread

The lexmark printer i was using was
Model : Lexmark Platinum Pro905
Other (perhaps) relevant info
Machine type-model : 4444-30E
Serial no : 00052758624

Would you have a link to the relevant 'Viewer AX sdk' you mentioned
I would like to try this sdk sample code and see if i get the same issue
This may help in loczting where the problem is

Again thank you so much for all your help
It is much appreciated
Attachments
568.pdf
This is the PDF file i attempted to print to the lexmark printer (and resulted in blank pages)
(246.15 KiB) Downloaded 185 times

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 14154
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Blank Pages being printed out on lexmark printer

Post by Tracker Supp-Stefan » Mon Jan 31, 2011 12:40 pm

Hello John Walsh,

The Viewer SDK package you have downloaded should have installed both the simple and the AX SDKs, with all the relevant samples.
Please check e.g. for the C# examples
<install location>\PDF-XChange Viewer SDK\Examples\C#Examples\PrintDocument - actually pretty much any sample in the examples folder besides the PXCView36 is using the AX.

Also a compiled test app should be available in <install location>\PDF-XChange Viewer SDK\Bin(.64)\AX_C#Examples

Best,
Stefan

johnpWalsh
User
Posts: 16
Joined: Fri Jan 28, 2011 10:35 am

Re: Blank Pages being printed out on lexmark printer

Post by johnpWalsh » Thu Feb 03, 2011 12:00 pm

Hi
Again thank you for your reply
(apologies for not getting back sooner but been out sick from work)
Firstly i've tried this on a new clean Windows XP 32 machine and installed the Lexmark printer using the CD that came with the printer.

I tried all the various samples in <install location>\PDF-XChange Viewer SDK\Bin
They all work fine (ie print) except for the the C# sample ?? (PXCView36_sample_csharp.exe)
This doesn't print anything at all now!
If i open the windows printers dialog box (start->printers->lexmark printer) i can see the print job listed in the window but then it dissapears)

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 14154
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Blank Pages being printed out on lexmark printer

Post by Tracker Supp-Stefan » Thu Feb 03, 2011 1:40 pm

Thanks for the update John,

I have asked the person responsible for those samples to check them once again.

Best,
Stefan

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 14154
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Blank Pages being printed out on lexmark printer

Post by Tracker Supp-Stefan » Thu Feb 03, 2011 5:30 pm

Hello John,

We had one of our developers check the C# samples and he says that everything is working fine with them.
Please check if everything is set up correctly on your end.

Regards,
Stefan

johnpWalsh
User
Posts: 16
Joined: Fri Jan 28, 2011 10:35 am

Re: Blank Pages being printed out on lexmark printer

Post by johnpWalsh » Fri Feb 04, 2011 2:43 pm

Hi
Thanks again

I've tried the C# sample and the VB.net sample provided in the SDK many times :
-<install location>\PDF-XChange Viewer SDK\Bin\PXCView36_sample_csharp.exe
VERSUS
- <install location>\PDF-XChange Viewer SDK\Bin\PXCView36_sample_vbnet.exe

The C# sample doesn't print out pages (I've noticed that if blank page suppression is turned off on printer, it prints out the correct number of pages , except that they are blank!)
The VB.net sample is working fine

NB: Please note this ONLY occurs when i test with the LEXMARK printer

I then looked at both samples in the code
-> PDF-XChange Viewer SDK\Examples\C#Examples\PXCView36
and
-> PDF-XChange Viewer SDK\Examples\VBNetExamples\PXCView36
They look quite different, code wise :
(A)
- The C# code has a class called 'PDFDoc' which seems to be a wrapper (for ease of use) around the various PVCX functions
- The Vb.net sample does not have this wrapper and its code calls the relevant PVCX functions directly
(B)
Also the 'PrintDocument' class (m_DocToPrint) has a call back function 'PrintPage' which very different in both
- The Vb.net code calculates 2 scaling factors, called Kw and Kh : Kw is a ratio of page width to doc width, Kh is a ratio of page height to Doc height)
- The C# code calculates 2 equivalent scaling factors, called K1 and K2 : K1 is ratio of page width to page height, K2 is ratio of doc width to doc height
The VB.net ratios seem to me to make more sense for sizing/scaling (i've only looked at the code quickly so forgive me if i'n not reading this correctly)
(C)
In the VB.net code, this call back function 'PrintPage' uses the Windows API 'GetDeviceCaps' to get various dimensions
I don't see anywhere in the C# code where 'GetDeviceCaps' is used.

Again i dont know if these are of any relevance, but it is just the areas i see where the code is abviously different

So i did the following for testing purposes
1) I converted the VB.net SDK sample code into equivalent c# code (i.e C# code that now does NOT use the PDFDoc class wrapper and acts exactly as the VB.net code)
2) I copied this new C# code into my application
3) I copied the original SDK VB sample code into my app
4) I copied the original SDK C# sample code into my app
5) I then Ran my application allowing the user to decide which code path to follow when printing (to my lexmark printer)

6) The converted "vb.net -> c#" code and the original VB code works fine
7) The original c# code (that uses the 'PDFDoc' wrapper) does not work

Again i need to reiterate - this problem only occurs when i test on the lexmark printer. I've tested on other printers (e.g HP) and it works fine
Therefore it would appear it is an issue when the code is run with a specific lexmark driver (the one that came with my Lexmark Platinum Pro905 printer)

Corwin - Tracker Sup
User
Posts: 670
Joined: Tue Nov 14, 2006 12:23 pm

Re: Blank Pages being printed out on lexmark printer

Post by Corwin - Tracker Sup » Fri Feb 04, 2011 3:06 pm

Hello John,

We will investigate such difference between C# and VB.NET samples. Thank you for your info.

Post Reply