Bold and Italics with imbedded font

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.

Moderators: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Support Staff, moderators

Post Reply
mccollim
User
Posts: 4
Joined: Wed Feb 23, 2005 4:05 pm

Bold and Italics with imbedded font

Post by mccollim » Tue Mar 01, 2005 2:04 pm

I purchased a Letter Gothic font from LinoType which works very well. Howerver, I have tried to use the SetTextOptions to bold and set the italic angle, but the text does not change. Below is a snipet of my program. I get no errors. What am I missing?


res = PXC_AddFontFromFileA(pdf, "F:\\Fonts\\Fonts\\PC TT Single\\Letter Gothic\\lte50102.ttf", NULL, &fntID);

topt.cbSize = sizeof(PXC_TextOptions);
topt.fontID = fntID;
topt.fontSize = fsize;
topt.nTextPosition = TextPosition_Top;
topt.LineSpacing = lnSpace;
topt.PapaSpacing = 0;
topt.SimItalicAngle = 75;
topt.SimBoldThickness = 600;
res = PXC_SetTextOptions(page, &topt);
if (IS_DS_ERROR(res))
{
PXC_ReleaseDocument(pdf);
return (0);
}

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Tue Mar 01, 2005 4:42 pm

Can you confirm whether you are using V2.x or V3 - as the functions you are using appear to be V3 - but you are posting iin the V2.x forum ?

thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

mccollim
User
Posts: 4
Joined: Wed Feb 23, 2005 4:05 pm

Bolld and Italics

Post by mccollim » Wed Mar 02, 2005 2:02 am

I am using

PDF-XChange & Tools Developer Library for the PDF format – Version 3


What forum should I be using.

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Wed Mar 02, 2005 9:30 am

Hi,

Please use this forum :)

http://www.tracker-software.com/forum/viewforum.php?f=3

Will move this post to that forum.

With regards your question - we have identified the issue and investigating a work around.

Briefly this is it :

In the driver we can 'simulate' bold in any font when it does not naturally exist (in a similar way to that which MS Word uses for example) - but from the DLL library methods it is a far more complex issue and our development team ar looking at this now - hope to have an answer for you in the next 24-48 hours.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

johnnyg
User
Posts: 2
Joined: Thu Aug 17, 2006 4:46 am

Post by johnnyg » Thu Aug 17, 2006 6:42 pm

Is there an answer to this problem?

When we print a word document containing text using "Symbol" font that's Bold or Italic, with PDF-XChange 3.60.0103 Driver it looks correct. When we use the dll sdk using the code snippets below:

_PXC_TextOptions to, tc;
memset(&to, 0, sizeof(to));
to.cbSize = sizeof(to);
PXC_GetTextOptions(m_page, &to);
memcpy(&tc, &to, sizeof(to));
to.SimItalicAngle = 45;
to.SimBoldThickness = 900;
PXC_SetTextOptions(m_page, &to);

PXC_TextOutW(...)

it doesn't seem to work.

using PDF-XChange 3.60.0103 dll sdk

Any idea?

thanks,
john

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Thu Aug 17, 2006 9:23 pm

Hi

Could you please post a sample document and PDF please (Zipped)

Thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

johnnyg
User
Posts: 2
Joined: Thu Aug 17, 2006 4:46 am

Post by johnnyg » Thu Aug 17, 2006 10:59 pm

The problem occurs even the font is not embedded. I've also added a simple code that will reproduce the problem.

Dwf2PDFFonts-1-driver-embedded-fonts.pdf and Dwf2PDFFonts-1-driver-never-embed-fonts.pdf are created from a word document using pdf-xchange driver. The other pdf files are created by the sample code.
Attachments
sample_code_pdf.zip
(148.16 KiB) Downloaded 144 times

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Fri Aug 18, 2006 9:50 am

Hi John,

thanks for the files and info and we now fully understand the issue.

The fonts where you are seeing this do not natively support Bold/Itallic etc so what Windows (not just Word) does is 'emulate' this functionality - however when you 'print' such a document with these fonts and Windows emulates these attributes no such properties are passed to the printer as would happen when a document with fonts that DO natively support Bold/Itallic etc.

With our print driver we did not originally support this functionality - you would have had the same experience you are having now when using the libraries - however after many requests we did eventually create a method to acheive this within the print driver - with some significant investment in terms of time and effort.

To do so within the libraries would take at least the same effort and very likely be even more complex to achieve.

For now at least - I am afraid there is no solution to this issue (other than to use the print driver) - we will add this to the wish list for a future release but I cannot say when this will come to fruition.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Post Reply