text size near 0

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: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

text size near 0

Post by marcovdlinden »

Call using the latest sdk:
PXCp_ET_GetElement( pMdData->m_pPdfDoc, dwTemp, &tElement, 0 );
resulting height (from the matrix): 0.05 points


I'm afraid I can't add the example.
But the font was a Times new Roman font embedded as:
Times-New-Roman-Bold+0 (Embedded) Type: TrueType Encoding Build-in
The actual point size of the text was 7.95

text directly next to it that we could read with PXCp_ET_GetElement was in font:
Times-New-Roman-Bold+1 (Embedded) Type: TrueType Encoding Build-in
and pont size 8

The question: is this a bug you can reproduce (and fix)?
I'm guessing the 7.95 font size confuses it and reduces it to 0.05??

note that it's only this specific pdf document that is giving us problems so we are pretty sure that our surrounding code is ok.
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: text size near 0

Post by Tracker Supp-Stefan »

Hi Marco,

It would be really helpful if you can provide us with a sample project and file and if we manage to reproduce it then we will try to fix it. If the file is sensitive - please send the project and the sample to support@pdf-xchange.com . We will then investigate where the problem is and advise what we have found.

Best,
Stefan
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: text size near 0

Post by marcovdlinden »

Ok, I send the PDF file.
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: text size near 0

Post by Tracker Supp-Stefan »

Thanks Marco,

We've got the file and are investigating this.

Best,
Stefan
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: text size near 0

Post by Tracker Supp-Stefan »

Hi Marco,

After discussing this with one of my colleagues here is what we can advise:

The PXP_TextElement structure has several fields, related to font size.
FontSize - font size, specified in PDF (in points).
Th - horizontal distortion coefficient, in percents (100 - original size).
Matrix - combined PDF matrix, used to transform all drawings, including text.
In the sample file the Matrix is 0.05 0 0 0.05 ??? ???, which means that everything will be scaled down 20 times.
And the font sizes in your PDF are 159, 160 and so on, so after scaling that the resulting text will appear with font size of 7.95, 8, etc.

Best,
Stefan
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: text size near 0

Post by marcovdlinden »

Thanks that solved our problems. :)
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: text size near 0

Post by Tracker Supp-Stefan »

Great to hear that!

Cheers,
Stefan
Post Reply