Print Page | Close Window

Retriving Form Field Object

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: Sample Code
Forum Description: Share Debenu Quick PDF Library sample code with other forum members
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3111
Printed Date: 26 Nov 24 at 5:17AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Retriving Form Field Object
Posted By: ramtankala
Subject: Retriving Form Field Object
Date Posted: 01 May 15 at 1:41PM
Thanks in advance...

My requirement is how to get the each form field name, field value, position of field(X-axis and Y-axis),field height,field width.

I am not able to read each field object.

Give me an idea how to get the form field object.


it is very urgent..



Replies:
Posted By: erico
Date Posted: 01 May 15 at 7:35PM
Function FornmFieldCount() will give you the number of fields.

Iterate using GetFormFieldBound() to get x,y axis and sizes. Many other "GetFormField..." functions to obtain the other information required. It's all in the documentation.


-------------
Eric O


Posted By: AndrewC
Date Posted: 06 May 15 at 9:13AM

Hello,

You can use code similar to the code below.  GetFormFieldCount will return the total number of formfields located in the PDF.  If it is 0 then there are no formfields.  You can then use a loop from 1 to FormFieldCount to access each formfield.  item 1 is the first formfield, 2 the second ...
  for i = 1 to GetFormFieldCount()
  {
    // use i as the index to the formfields

    type = QP.GetFormFieldTpe(i);

    x = QP.GetFormFieldBound( i, 1);
    y = QP.GetFormFieldBound( i, 2);

    title = QP.GetFormFieldTitle(i);  // formfield name

    value = QP.GetFormFieldValue(i);

    ..
    ..

There are many other form field functions.  Use this link to see them all.

  http://www.debenu.com/docs/pdf_library_reference/FormFields.php

Andrew



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