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, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan

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

text size near 0

Post by marcovdlinden » Fri Aug 24, 2012 1:28 pm

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: 13619
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: text size near 0

Post by Tracker Supp-Stefan » Fri Aug 24, 2012 3:46 pm

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@tracker-software.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 » Tue Aug 28, 2012 8:11 am

Ok, I send the PDF file.
Marco

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

Re: text size near 0

Post by Tracker Supp-Stefan » Tue Aug 28, 2012 12:27 pm

Thanks Marco,

We've got the file and are investigating this.

Best,
Stefan

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

Re: text size near 0

Post by Tracker Supp-Stefan » Wed Aug 29, 2012 9:29 am

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 » Wed Aug 29, 2012 10:23 am

Thanks that solved our problems. :)
Marco

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

Re: text size near 0

Post by Tracker Supp-Stefan » Wed Aug 29, 2012 10:46 am

Great to hear that!

Cheers,
Stefan

Post Reply