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 - Preserve leading spaces
  FAQ FAQ  Forum Search   Register Register  Login Login

Preserve leading spaces

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

Joined: 10 Jun 15
Location: Hutchinson, MN
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcurtiss Quote  Post ReplyReply Direct Link To This Post Topic: Preserve leading spaces
    Posted: 10 Jun 15 at 8:38PM
When using QP.DrawWrappedText it looks like the leading spaces are removed.  So if my original text is
sentence 1<CR><LF>
hdr1     hdr2       hdr3<CR><LF>
a           a1          a2<CR><LF>
            b1           b2<CR><LF>
            c1           c2<CR><LF>

I end up with 
sentence 1
hdr1     hdr2       hdr3
a           a1          a2
b1           b2
c1           c2

Is there a way of preventing the leading spaces from being trimmed?

Thank you,
John
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (1) Thanks(1)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jun 15 at 5:59AM
Change them to non breaking space, I mean char A0 in hex.
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600
Back to Top
jcurtiss View Drop Down
Beginner
Beginner
Avatar

Joined: 10 Jun 15
Location: Hutchinson, MN
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcurtiss Quote  Post ReplyReply Direct Link To This Post Posted: 12 Jun 15 at 4:01PM
What I did is if the first character of each line was a space replace that character with a non-breaking space.  The other spaces I left alone.  If I replace every space with a non-breaking space then the lines that should word wrap won't.   

Thank you for pointing me in the right direction!  I appreciate your help.
John
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 12 Jun 15 at 7:45PM
You're welcome.

Cheers!
mLipok
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600
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