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, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

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 »

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: 17903
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 »

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
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: Blank Pages being printed out on lexmark printer

Post by John - Tracker Supp »

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 »

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 244 times
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17903
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 »

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 »

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: 17903
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 »

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: 17903
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 »

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 »

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: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Blank Pages being printed out on lexmark printer

Post by Corwin - Tracker Sup »

Hello John,

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