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 - Multiline text form field
  FAQ FAQ  Forum Search   Register Register  Login Login

Multiline text form field

 Post Reply Post Reply
Author
Message
skipper View Drop Down
Beginner
Beginner


Joined: 29 Jan 11
Location: Italy
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote skipper Quote  Post ReplyReply Direct Link To This Post Topic: Multiline text form field
    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
If ix <> 0 Then
 
pdflib.SetFormFieldTextFlags(ix,
1, 0, 0, 0, 0)
  pdflib.SetFormFieldBounds(ix, m_left, m_top, m_width, m_height)
  pdflib.SetFormFieldValue(ix, mVar)          '--mVar = string text variable

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
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: 29 Jan 11 at 12:50PM
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

Back to Top
skipper View Drop Down
Beginner
Beginner


Joined: 29 Jan 11
Location: Italy
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote skipper Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jan 11 at 8:15PM
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. Wink
 
I'll let you know if my code still does not work. Cry
 
Many thanks for now
Mimmo
Back to Top
Dimitry View Drop Down
Team Player
Team Player


Joined: 18 Feb 10
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dimitry Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jan 11 at 12:09AM
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
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: 30 Jan 11 at 12:52AM
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?

Back to Top
Dimitry View Drop Down
Team Player
Team Player


Joined: 18 Feb 10
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dimitry Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jan 11 at 12:57AM
Hi Ingo,
 
Well, multiline form field certainly has an automatic word-wrapping included :)
Just try attached code sample.
 
Regards,
Dmitry
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