Page 1 of 1

EMF Embedding (Via PXC_GetContentDC) has incorrect output.

Posted: Sat Feb 25, 2006 12:36 am
by daveinsta
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.

Posted: Mon Feb 27, 2006 3:15 pm
by John - Tracker Supp
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.

Posted: Mon Mar 06, 2006 7:08 am
by John - Tracker Supp
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 :

Required :
Agfa Rotis Semisans

Many thanks

Agfa fonts

Posted: Tue Mar 07, 2006 8:49 pm
by daveinsta
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

Posted: Wed Mar 08, 2006 12:56 pm
by John - Tracker Supp
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.

Posted: Wed Mar 08, 2006 1:00 pm
by John - Tracker Supp
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 ?