Print Page | Close Window

Spaces lost in multiline form field

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=1990
Printed Date: 04 Apr 26 at 11:06PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Spaces lost in multiline form field
Posted By: CASheaCo
Subject: Spaces lost in multiline form field
Date Posted: 07 Oct 11 at 9:41PM
I have run into a problem with multiline form fields when I include mulitple spaces in a string that I am saving.

If I do the following:

A:='A            bcd';
QuickPDF.SetFormFieldValue(idx, A);

QuickPDF.FlattenFormField(idx);
QuickPDF.SavetoFile('Temp.pdf');

When I look at Temp.pdf the field is "A bcd"

If do not flatten, when I look at the file in Adobe the spaces are still there.

Is there something I can do to stop the flattening process from removing the spaces?

Thank you



Replies:
Posted By: Ingo
Date Posted: 08 Oct 11 at 11:51AM
Hi Shea!

What you described is the normal way.
Multiple spaces in one row will be condensed to one.
Try this ...
A := 'A' + #32 + #32 + 'bcd';
...or something with Chr(32).
This will work.

Cheers and welcome here,
Ingo




Posted By: AndrewC
Date Posted: 10 Oct 11 at 6:18AM
We will be making some changes to fix this to work the same as Acrobat.  

Andrew.


Posted By: CASheaCo
Date Posted: 11 Oct 11 at 3:21PM
Thanks, Ingo and AndrewC.

Ingo suggestion did not work.  

The spaces do not get lost when the string is assigned to the field, they get lost in the flattening process.

Is there some workaround that you can suggest while QuickPDF is being fixed?

Thanks


Posted By: AndrewC
Date Posted: 11 Oct 11 at 4:20PM
We have added a fix to the 8.12 beta release due out later today.

The fix preserves spaces.  The only small issue is leading spaces.  Acrobat ignores leading spaces when drawing the form field text string and we have made QPL draw the string the same way when leading spaces are used.



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