Garbled text when drawing into DC from PXC_GetContentDC()

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

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

gregpryor
User
Posts: 3
Joined: Tue Aug 15, 2006 7:03 pm

Garbled text when drawing into DC from PXC_GetContentDC()

Post by gregpryor »

I'm using the viewer dll to draw a page from a pdf into a DC obtained from PXC_GetContentDC().
All was well up to (and including) version 2.0.42.2 of pxcview.dll.
However, when using version 2.0.44.0 or 2.0.46.0 much of the text is not recognizable as text anymore.
I'm using PXV_CommonRenderParameters.Flags = pxvrpf_UseVectorRenderer and RenderTarget = pxvrm_Printing.
I've tried some of the other flags/targets but nothing improved the result.

I've attached a zip containing pdfs produced by 2.0.42.2 and 2.0.44.0
You do not have the required permissions to view the files attached to this post.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Garbled text when drawing into DC from PXC_GetContentDC()

Post by Ivan - Tracker Software »

Please send (or attach there) the original PDF file which you are drawing using the pxcview.dll ..

thanks
PDF-XChange Co Ltd. (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.
gregpryor
User
Posts: 3
Joined: Tue Aug 15, 2006 7:03 pm

Re: Garbled text when drawing into DC from PXC_GetContentDC()

Post by gregpryor »

Here you go.
You do not have the required permissions to view the files attached to this post.
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: Garbled text when drawing into DC from PXC_GetContentDC()

Post by Lzcat - Tracker Supp »

The Problem is that your document uses embedded fonts, which are in many cases drawn as curves (at least for now).

However even we are able to draw text using the font embedded in the pdf as text you will not get correct text when select it and copy - this is because character codes are lost during this operation.

A Much better option for your case - do not use PXC_GetContentDC and pxcview.dll to draw page content into this DC, but use the PXCp_PlaceContents functions to combine two PDF files.

HTH
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.