Print Page | Close Window

Preserve leading spaces

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=3134
Printed Date: 30 Apr 24 at 6:07PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Preserve leading spaces
Posted By: jcurtiss
Subject: Preserve leading spaces
Date 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



Replies:
Posted By: mLipok
Date 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


Posted By: jcurtiss
Date 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


Posted By: mLipok
Date 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



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