Printing problem

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

Xendar
User
Posts: 4
Joined: Fri Jun 19, 2015 1:21 pm

Printing problem

Post by Xendar »

Hi,
I have a problem printing PDF's files with "PXCV_DrawPageToDC" function. Please see attached RAR with a test PDF and 2 OXPS files. Same result if I print on a "real" printer.

Printing the PDF with "pxvrpf_UseVectorRenderer" flag only, I have squares at the end of each text line. If I print same PDF file with "pxvrpf_UseVectorRenderer | pxvrpf_AllFontsAsCuves" flags ( R's missing on CuRves :mrgreen: ) I have a lower printing font quality, but I haven't the squares.

Until today we printed without "pxvrpf_AllFontsAsCuves" flag and, if it's possibile, we prefer so.

Thanks
Sandro
You do not have the required permissions to view the files attached to this post.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17960
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: Printing problem

Post by Tracker Supp-Stefan »

Hello Sandro,

Welcome to our forums!
Can you please let us know if this only happens with that particular file or with any?

Regards,
Stefan
Xendar
User
Posts: 4
Joined: Fri Jun 19, 2015 1:21 pm

Re: Printing problem

Post by Xendar »

Hi Stefan, thank you.

We found this problem after upgrading pxcview.dll to last version from 2.0.0.36 that works fine. We have this problem on our documents containing multiline texts ('\n' char between lines).

Regards,
Sandro
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3556
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada

Re: Printing problem

Post by Ivan - Tracker Software »

We have this problem on our documents containing multiline texts ('\n' char between lines).
New line characters are not used in PDF to make new lines as in regular text files.
If you generate PDFs by yourself, you can fix it easily.


On our side I have changed the print routine in the Viewer and Simple Viewer DLL to handle invalid glyphs properly. That fix will be available in build 314.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Xendar
User
Posts: 4
Joined: Fri Jun 19, 2015 1:21 pm

Re: Printing problem

Post by Xendar »

Thank you.
Please note that PDFs are correctly showed by your DLL, the problem is only on the print routine. With Acrobat Reader, i.e., showing and printing are OK, so I think that PDFs are correctly made (we use libHaru for generating PDF files).
Xendar
User
Posts: 4
Joined: Fri Jun 19, 2015 1:21 pm

Re: Printing problem

Post by Xendar »

If I go into the PDF file, I find that text with print problem is stored in this way:

(This\040is\012) '
(only\012) '
(a\040test\040!) '
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3556
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada

Re: Printing problem

Post by Ivan - Tracker Software »

Yes, the problem with printing happens because the Viewer (or Viewer SDK) renders text on printing using GDI and passes text as glyphs.
For '\n' (\012 in your content) chars there are no valid glyphs and GDI uses 'default' glyph of the font to render such glyphs and in this particular case default glyph looks like a hollow rectangle.

The new build has a workaround for such cases, but it is good idea for you to fix your PDF creation routines to not store new line chars in PDF text as well.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.