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 > General Discussion
  New Posts New Posts RSS Feed - Space trimming
  FAQ FAQ  Forum Search   Register Register  Login Login

Space trimming

 Post Reply Post Reply
Author
Message
GregS View Drop Down
Beginner
Beginner
Avatar

Joined: 30 Mar 06
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote GregS Quote  Post ReplyReply Direct Link To This Post Topic: Space trimming
    Posted: 30 Mar 06 at 3:48PM
Hi, we're using QuickPDF around here and we're trying to dump some text from an RTF file into a PDF with the FitTextBox function. The problem we're encountering is that QuickPDF is "trim"ing spaces in the text. So if I have leading spaces to more a word over, the excess space (anything more than a single space or maybe 2 after a period) is cut, so input like:
Hello          World

Is rendered as:
Hello World

This is kind of inconvenient for what we're trying to do, is there a way to force QuickPDF to recognize the spacing?
Back to Top
JanN View Drop Down
Senior Member
Senior Member


Joined: 29 Oct 05
Location: Germany
Status: Offline
Points: 116
Post Options Post Options   Thanks (0) Thanks(0)   Quote JanN Quote  Post ReplyReply Direct Link To This Post Posted: 30 Mar 06 at 4:56PM
You could try to substitute the "normal" space with the ascii character 160.
Back to Top
hbarclay View Drop Down
Team Player
Team Player


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote hbarclay Quote  Post ReplyReply Direct Link To This Post Posted: 30 Mar 06 at 5:22PM
Originally posted by GregS GregS wrote:


input like:
Hello          World

Is rendered as:
Hello World
spacing?



I haven't tested this with the FitTextBox function, but wouldn't this just be a matter of selecting a Fixed Width font instead of a Variable Width font.

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

Joined: 05 Dec 05
Location: United States
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote swb1 Quote  Post ReplyReply Direct Link To This Post Posted: 30 Mar 06 at 6:07PM

The problem is not font related.

 

The FitTextBox routine makes a call to a wraptext function that removes superfluous spaces, tabs and other common white space characters in an effort to make sure that the text will fit in the boundaries supplied.

 

Jan’s suggestion of using #160 in place of the spaces should work.

 

Regards

sb

Back to Top
GregS View Drop Down
Beginner
Beginner
Avatar

Joined: 30 Mar 06
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote GregS Quote  Post ReplyReply Direct Link To This Post Posted: 31 Mar 06 at 4:46PM
Worked like a champ, thanks. :)
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. About — Contact — Blog — Support — Online Store