Extracting Computer Modern font information

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

bgbnbigben
User
Posts: 8
Joined: Fri Sep 06, 2013 2:39 am

Extracting Computer Modern font information

Post by bgbnbigben »

Hi,

I'm having a little trouble extracting font information on the CM font family, using C# with P/Invoke on the native PDFXC-pro DLLs. To the best of my understanding, it seems PXCp_ET_GetFontInfo should return a font ID between 1 and PXCp_ET_GetFontCount, however on a document generated by LaTeX (thus with only CM fonts) every font is assigned an ID of 1.

Image.

Could anyone confirm whether this is a known issue, or whether there's something I'm missing?

- Ben
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: Extracting Computer Modern font information

Post by Lzcat - Tracker Supp »

Hi Ben.
Problem is in line

Code: Select all

PDFXC.PDFXC_Func.PXC_AddFontW(outPUF, (int)PDFXC.PDFXC_Func.PXC_FontWeight.FW_NORMAL, false, fontName, out fontID);
PXC_AddFontW function cannont find CM... font in system, so it substitute them using system fonts. Unfortunately sytem font is same for all CM... fonts, this is why you getting same ID for all fonts.
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.
bgbnbigben
User
Posts: 8
Joined: Fri Sep 06, 2013 2:39 am

Re: Extracting Computer Modern font information

Post by bgbnbigben »

Ah, so it is. Thanks so much for the help!
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17949
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: Extracting Computer Modern font information

Post by Tracker Supp-Stefan »

:)