Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Embedded TrueType Font gives wrong characters
  FAQ FAQ  Forum Search   Register Register  Login Login

Embedded TrueType Font gives wrong characters

 Post Reply Post Reply
Author
Message
chandy21 View Drop Down
Team Player
Team Player
Avatar

Joined: 23 Sep 09
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote chandy21 Quote  Post ReplyReply Direct Link To This Post Topic: Embedded TrueType Font gives wrong characters
    Posted: 11 Nov 09 at 1:52AM

Hi all,

    I am getting some strange behavior with a document I have.

    I am selecting one of the Fonts which reports to be embedded in the Document as FontType = 4. The FontName reports as "BAAAAA+Arial-BoldMT" (which by convention of "(6 alphanum)+" should be embedded in the document). When I select that Font, or any other embedded one for that matter, the characters I draw using DrawText() come out as totally different characters.

    The same code works fine in other documents, for example the QuiclPDF Reference Guide.

    Any clues as to what could be different with this document? Font Encoding perhaps? I have tried to set that to a couple of different values to no avail.

    I am testing with the following PDF: http://help.joomla.org/ghop/feb2008/task048/joomla_15_quickstart.pdf

    For exmaple, the following sentence:

"Joomla! 1.5: Quick Start Guide"

    comes out as:

"      w L2h                               "

    Any help would be greatly appreciated,


Thanks,

Ando.



Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 11 Nov 09 at 6:19AM
Hi Ando!

The pdf was made with OO 2.3 Writer - that's the problem.
Please send your bug description and the link to the Joomla-pdf
to the official support-adress. Thanks.

Cheers, Ingo
Back to Top
chandy21 View Drop Down
Team Player
Team Player
Avatar

Joined: 23 Sep 09
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote chandy21 Quote  Post ReplyReply Direct Link To This Post Posted: 11 Nov 09 at 6:23AM

Hi Ingo,

    Thanks for your reply. Is there a known problem with documents created by OO Writer? Is it just a matter of selecting a different Encoding? Or is this maybe a Unicode issue? I am seeing the Fonts, it just seems that the Char Glyphs don't line up when I DrawText and that I get the wrong Glyph.

Thanks in advance,

Ando.

Back to Top
DELBEKE View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert
Avatar

Joined: 31 Oct 05
Location: France
Status: Offline
Points: 151
Post Options Post Options   Thanks (0) Thanks(0)   Quote DELBEKE Quote  Post ReplyReply Direct Link To This Post Posted: 11 Nov 09 at 7:35AM
Hi Ando
 
The embedded font is probably subsetted and don't containt all the glyphs.
This is often used when you have unicoded string
Back to Top
chandy21 View Drop Down
Team Player
Team Player
Avatar

Joined: 23 Sep 09
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote chandy21 Quote  Post ReplyReply Direct Link To This Post Posted: 11 Nov 09 at 9:08AM

Hi Debelke,

    If I try to write the same string as is there now, it comes out with incorrect Glyphs. I extracted the text and it is correct, I then try to do DrawText() with that SAME string, and it is illegible. I have tried GetSubsetFont() also, and that only returns what I send in, so no remapping of characters. Could it be that I am somehow needing to use Unicode strings into DrawText()? I am using C# with the ActiveX library.


Thanks in advance,

Ando.

Back to Top
chandy21 View Drop Down
Team Player
Team Player
Avatar

Joined: 23 Sep 09
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote chandy21 Quote  Post ReplyReply Direct Link To This Post Posted: 17 Nov 09 at 4:15AM

When I extract one of these Fonts using SaveFontToFile(), the Font comes out as a 31kb file, but when I try to Load it back into a Document using AddTrueTypeFontFromFile() the function fails with a return value of 0. I am guessing the Font has problems, but it appears to display Ok in the original Document, so I am confused.


Any further thoughts?

Thanks in advance,

Ando.

Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 24 Nov 09 at 2:38AM
Hi Ando,

The SaveFontToFile function will only work with TrueType fonts that are fully embedded within a document. If the font is an embedded subset, then this function won't work.

Cheers,
- Rowan.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store