Copying text

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 or PDF-XChange Viewer SDK if appropriate.

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

ondrejb
User
Posts: 29
Joined: Thu Sep 04, 2008 2:06 pm

Copying text

Post by ondrejb »

Hello,

I'm trying to copy text from an existing PDF to a new document, preserving the text position and formatting.

If I understand it correctly, I need at first read font info from the existing PDF and prepare/create fonts in the new PDF using the PXC_AddFontW function.

Now, I cannot find out how to determine the font weight (dword) value from the existing PDF:
* PXCp_ET_GetFontStyle returns a string, not dword.
* PXCp_ET_GetFontInfo doesn't seem to return any font weight info.

What would you propose to achieve the goal?
Thanks
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3605
Joined: Thu Jul 08, 2004 10:36 pm

Re: Copying text

Post by Ivan - Tracker Software »

Font weight information is not always necessary in a PDF - the only place where it might be useful (from the perspective of viewing the PDF) is for font substitution where a font is not embedded, but for such purposes name of font style is used instead.

Therefore currently we do not offer a high level API for such content extraction/identification as there was no need for must purposes - you could of course attempt to use the low level API (if you own the PDF-XChange PRO SDK) and if you are sufficiently well versed in the PDF fomat do (and an indepth expertise is definatley required) - but I am afraid we offer no assistance in this area as it is extremley complex and there is no way for us to economcially provide such support
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.