Print Page | Close Window

text is bleeding in tables

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2679
Printed Date: 29 Sep 24 at 1:18AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: text is bleeding in tables
Posted By: Paulidis
Subject: text is bleeding in tables
Date Posted: 28 Jun 13 at 4:32PM
Hello. I have an issue with text that is bleeding out of the table cell it belongs in.

here is a screen shot.
https://dl.dropboxusercontent.com/u/978764/bleeding.png

any help is appreciated!




Replies:
Posted By: Ingo
Date Posted: 28 Jun 13 at 6:39PM
Hi!

The problem are the special characters. The library counts the place for each character and then there are single characters which could only be interpreted by more than one other characters. The place for the string can be counted only before.
So try to extract the text completely readable and then the text will find a place in the box completely ;-)
Try the search function here for fonts, character codes or similar ...

Cheers and welcome here,
Ingo



Posted By: Paulidis
Date Posted: 28 Jun 13 at 6:51PM
Thank you for your prompt response and thanks for making me feel welcome :)

Many apologies but I'm not quite sure what your answer means. Could you break it down for me? Thanks again.


Posted By: Ingo
Date Posted: 28 Jun 13 at 8:48PM
Hi!

Please have a look on your picture ;-)
Not all characters could be displayed well - That's 
the reason for the problems.
For example if your actual codepage can't display
the character H then it will replace the character
perhaps with abc - the library counts 1 place (for
the H but the replacements needs 3 places - so this
line will run out of the box.
Perhaps you want to output a greec text in an english 
system environment without regarding the correct
codepage to use? In this direction you should explore.
Here in the forum sections you will probably find useful
answers.

Cheers, Ingo


Posted By: Paulidis
Date Posted: 28 Jun 13 at 8:50PM
Aha. I see. Thank you once again. I will take a look around and post my findings here for others.


Posted By: Paulidis
Date Posted: 28 Jun 13 at 10:30PM
I did research and there is a lack of support on the matter. I don't understand why it wont just work. This lib should render Unicode characters properly without any configuration.


Posted By: tfrost
Date Posted: 29 Jun 13 at 12:00AM
Your problem is simple to diagnose, but I cannot offer you a solution without knowing the basic information which you have failed to provide: what version of the library are you using and what programming language?

The three characters 'i with double-dot', 'upside-down questionmark' and 'one-half' are the normal western font rendering of hexadecimal EF BF BD.  This is the UTF-8 encoding of the single character "REPLACEMENT CHARACTER (FFFD)" which is the result of converting a Unicode string to for example ASCII, which has no accented characters.  So in your text where you have for example "Décembre" the "é" has been converted to the replacement character (usually rendered in Unicode as a white questionmark inside a black diamond shape).  At some stage BEFORE passing to the Debenu library your text has had all its accented characters converted to this "don't know" character, and then to UTF-8.   You have then treated this text as ANSI and passed it to a Debenu library function as such, so this single UTF-8 character has been rendered as the three ANSI characters you see.  Obviously this causes the text to overflow its area, but your problem is the (many) encoding issues, not the rendering of the text.

Show your actual code, and someone may be able to help you sort out the mess.



Posted By: tfrost
Date Posted: 29 Jun 13 at 12:05AM
I forgot that this forum (unlike the Debenu library) does not support Unicode.  Obviously what I wrote in the double quotes was "Decembre" and "e", each with an acute accent in the appropriate place!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk