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!
![]() |
Multiline text form field |
Post Reply ![]() |
Author | |
skipper ![]() Beginner ![]() Joined: 29 Jan 11 Location: Italy Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() Posted: 29 Jan 11 at 3:48AM |
Hi all,
what is the right procedure to place a multiline text form field? I tried in different ways without success.
ix = pdflib.NewFormField(pFieldName, cText) '--cText = 1 End If This way does not work. The text is placed but then get cut at the end of bound. My intention is to autowrap the text content assigned to it, without inserting Chr(13) or Chr(13)+chr(10) . Calculating the right position of each single chr(13) would be a mess.
Is it possible? Could you please post few line of code? many thanks
Mimmo Edited by skipper - 29 Jan 11 at 3:48AM |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Skipper!
Try a search here (knowledgebase of QuickPDF) for an answer: http://help.quickpdflibrary.com/search?q=FormField You can download a demo-app-maker from the official supportpages to test a little bit with the settings: http://www.quickpdflibrary.com/blog/2009/10/a-customizable-demo-for-quick-pdf-library/ Cheers and welcome here, Ingo |
|
![]() |
|
skipper ![]() Beginner ![]() Joined: 29 Jan 11 Location: Italy Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
Hi Ingo,
many thanks for your reply and your welcome aboard. I agree with one of your customers that the suggested tools is a very valuable piece of software. It is the perfect complimentary tool for the help manual and for quick checking the still unknow functionalities of a such complex DLL.
I tested the sample code provided for the form fields and, with a quick modification, I got what I was asking for. I'll double check again my code because I don't see any difference between my code and the sample code. The only differences were the function call sequence and the text passed to the SetFormFieldValue() function. I'm using a variable, the sample use a constant text string. Changing both in the sample in order to replicate my code, I got the same expected result: the text wraps.
![]() I'll let you know if my code still does not work.
![]() Many thanks for now
Mimmo
|
|
![]() |
|
Dimitry ![]() Team Player ![]() Joined: 18 Feb 10 Status: Offline Points: 37 |
![]() ![]() ![]() ![]() ![]() |
Hi Mimmo,
Quick PDF Library contains essential functionality for form field text wrapping.
So if you need word wrapped or #13 wrapped form field text
please try this Delphi sample:
var
f: Integer; begin with QPL do begin // Create and unlock QPL here
// . . .
f := NewFormField('MultiText1', 1); SetOrigin(1); SetFormFieldBounds(f, 50, 50, 135, 80); SetFormFieldBackgroundColor(f, 0.8, 0.8, 1); SetFormFieldTextFlags(f, 1, 0, 0, 0, 0); SetFormFieldValue(1, 'This text is wrapped using two basic types of wrapping: word wrap and #13 wrap' + #13 + 'Line 1...' + #13 + 'Line 2...' + #13 + 'Line 3...'); UpdateAppearanceStream(f);
SaveToFile('output.pdf');
end; end;
If you still have some issues connected with form field text wrapping,
please link your problem PDF file and add detailed issue description.
|
|
Regards,
Dmitry |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi!
This is what Skipper has written: "... Calculating the right position of each single chr(13) would be a mess. ..." He knows how to break lines. He thought that a multiline-field has an automatic word-wrapping included ;-) Cheers, Ingo @Skipper: I'm a user not the publisher ;-) @Dmitry: Are you from Debenu? |
|
![]() |
|
Dimitry ![]() Team Player ![]() Joined: 18 Feb 10 Status: Offline Points: 37 |
![]() ![]() ![]() ![]() ![]() |
Hi Ingo,
Well, multiline form field certainly has an automatic word-wrapping included :)
Just try attached code sample.
|
|
Regards,
Dmitry |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store