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 - Spaces in DrawTextBox not displayed in pdf
  FAQ FAQ  Forum Search   Register Register  Login Login

Spaces in DrawTextBox not displayed in pdf

 Post Reply Post Reply
Author
Message
stakon View Drop Down
Team Player
Team Player


Joined: 09 Oct 09
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote stakon Quote  Post ReplyReply Direct Link To This Post Topic: Spaces in DrawTextBox not displayed in pdf
    Posted: 07 Dec 09 at 9:41AM
Good day,

I have noticed that when writing in a pdf file using DrawTextBox . any spaces in the string provided are truncated.
For example when calling: DrawTextBox(left,top,width,height,"4 spaces    10 spaces:          end",0);
what is really in th pdf is: 4 spaces 10 spaces: end

Btw when using DrawText, the above problem does not appear.

Thanx in advance,

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

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 07 Dec 09 at 9:59AM
Hi Stakon!

It's not a bug - It's a feature ;-)
The developers had thought that it makes more sense to remove the spaces while using textboxes.
But you has already seen how to avoid this behavior (using DrawText)...
BTW: Is it the same if you're using Chr(32) instead of real space?

Cheers, Ingo
Back to Top
stakon View Drop Down
Team Player
Team Player


Joined: 09 Oct 09
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote stakon Quote  Post ReplyReply Direct Link To This Post Posted: 07 Dec 09 at 10:56AM
Hi Ingo,

I guess then that  it is a buggy feature :p
A more useful implementation would be to set the truncating on/off in the options parameter...
I also tried your idea by providing ("%c",32) but it was just the same.
By using DrawText i lose much of the DrawTextBox convenience...

How can i make a request, so that this "fetaure" becomes friendlier?

stakon.

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

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 07 Dec 09 at 12:35PM
Hi!

In the general section i've posted soemthing for this case "the first step...".

Cheers, Ingo
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: 08 Dec 09 at 2:19PM
http://quickpdf.org/forum/adding-spaces-to-text-field_topic1271_post5839.html
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: 11 Dec 09 at 6:12AM
Ingo is right, it's by design.

The DrawTextBox function splits the text into words to do the wrapping and when it puts the words back together again it just adds a single space. Using Chr(160) should fix the problem as it is a non-breaking space. For the DrawHTMLText function the   entity can be used.

Cheers,
- Rowan.


Edited by Rowan - 11 Dec 09 at 6:13AM
Back to Top
stakon View Drop Down
Team Player
Team Player


Joined: 09 Oct 09
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote stakon Quote  Post ReplyReply Direct Link To This Post Posted: 11 Dec 09 at 7:44AM
Chr(160) works fine.


Thanx to all
!
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