EMF Embedding (Via PXC_GetContentDC) has incorrect output.

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Post Reply
daveinsta
User
Posts: 2
Joined: Fri Feb 24, 2006 11:32 pm

EMF Embedding (Via PXC_GetContentDC) has incorrect output.

Post by daveinsta » Sat Feb 25, 2006 12:36 am

I'm creating a PDF file with the PXC native SDK in C++.

Each page of the PDF is being drawn in two stages. First, all graphical elements (images, lines, shapes) are being drawn to a HBITMAP. The HBITMAP is then added and placed on the PDF page as a background image. Next, all text objects are drawn using the PXC_GetContentDC function to obtain a EMF DC. Text objects are drawn to the EMF DC via GDI+. This works in most cases, but some of the text objects are not rendering correctly in the PDF output file. Attached is an example of the PDF file being created with PDF-XChange SDK (not the printer driver), and a EMF file we generated using the exact same GDI/GDI+ function calls, substituting CreateEnhMetaFile for PXC_GetContentDC. When the EMF file is opened with Windows XP's "Windows Picture and Fax Viewer" application, it is displayed correctly.

Please look closely at the larger text above each section (it's bolder and slightly rotated). The weight of the font and the character spacing is all wrong in the PDF.

Also, the semi-transparent text being drawn looks like the text mask is being interpreted incorrectly, as the text and mask are being drawn separately (and half-height).

We are trying to use your toolkit for our web-based print content creation tool. It will be used for creating a PDF Proof for our customers, so accuracy is important.
Attachments
PDFTest.zip
Text EMF File and PDF File with display errors.
(421.99 KiB) Downloaded 148 times

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

Post by John - Tracker Supp » Mon Feb 27, 2006 3:15 pm

Hi Dave,

we believe we can resolve this in the next build 3.5099 - which should be available later this week.

However - please be aware that a far more reliable and robust method is to use the library functions available in the pxclib30 library to draw and generate your PDF directly - if possible.

Whilst we do all we can to support EMF conversion - this is very complex and reliant on many external factors which cannot always be guarenteed to produce accurate or reliable results in all circmumstances - outside factors like Device drivers ineracting with the GDI/GDI+ e can all play a part in making this problematic - additionally the fact that not all GDI+ methods are fully documented - does not help in the resolution of such issues.

Will advise when ready.
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

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

Post by John - Tracker Supp » Mon Mar 06, 2006 7:08 am

Hi Dave,

We are working on resolving the reported issue - however - we are in need of the fonts used - could you please copy and zip - then email the required fonts to usrfiles@tracker-software.com :

Required :
Agfa Rotis Semisans

Many thanks
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

daveinsta
User
Posts: 2
Joined: Fri Feb 24, 2006 11:32 pm

Agfa fonts

Post by daveinsta » Tue Mar 07, 2006 8:49 pm

Heya, sorry for the delay in getting back to you, I guess I should check my e-mail more often :wink:

I've attached the fonts you requested to help aid you in tracking down the problem, however, I took your advice and integrated your native API calls to accomplish the same goal.

It works very well and the only snag I've found is with semi-transparent text. It appears to render using a more desaturated color than GDI+ renders, but I'm guessing this is more of a shortcoming with Adobe's PDF viewing than the PDF generation itself. If I'm not mistaken your printer driver dithers the object to simulate the transparency, whereas in the native-mode API calls you are setting a transparency property. Is the dithering something that could be enabled? I'm not sure if we'll have any issue with it, as color accuracy isn't what is being proofed with these PDFs, it's more use for proofreading (type-o's) and layout (positioning) of items.

In any case, we've budgeted for the PDF toolkit for when we're ready to launch our system for public use, and I really appreciate the ability to integrate it and test it thoroughly prior to licensing. I would anticipate purchasing the license within a month. Thanks again for the response!
I've always had great results using your products in the past (I had purchased the PDF SDK version 1.0 while working at a previous employer) and working with your support staff is always a pleasure.

- Dave Price
Instaprint
Attachments
AgfaFont.zip
Agfa fonts
(105 KiB) Downloaded 145 times

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

Post by John - Tracker Supp » Wed Mar 08, 2006 12:56 pm

Thanks for the kind words Dave - much appreciated :)

I have asked the question regarding Dithering and will respond as soon as I get some considered feedback from the project team.

We are just enabling this in a new product called 'Raster-XChange' - but as this is being created from the ground up I suspect it is easier than with a product already fairly complex - it may be something that can be done now or may have to wait for the V4 release.

Will advise as soon as I have further info.
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

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

Post by John - Tracker Supp » Wed Mar 08, 2006 1:00 pm

Hi Dave,

Apparently - the PDF-XChnage driver does not simulate transparency via dithering - but uses the Windows GDI.

Perhaps you could upload a sample demonstrating the issue and we can look into more thoroughly ?

Thanks
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

Post Reply