PDF Form fill

In the last version, you can fill some pdf form. I have two remarks about this. I find the instantiation of PDFDocument very long. 60 seconds for the attached pdf file. (Less than one second for http://www.codeproject.com/csharp/MgPDFReader.asp). Moreover, I regret that I don’t have access to the Type of field. I wanted to do this: foreach (IPDFField iField in form.Fields) { Syncfusion.Pdf.Implementation.Parsing.PDFLoadedField field = iField as Syncfusion.Pdf.Implementation.Parsing.PDFLoadedField; if ((field != null) && (field.Type == PDFFieldTypeEnum.TextField)) { […] } } But the class Syncfusion.Pdf.Implementation.Parsing.PDFLoadedField is inaccessible due its protection level.

3 Replies

MM Mattieu Mezil June 6, 2006 09:18 AM UTC

>In the last version, you can fill some pdf form. >I have two remarks about this. > >I find the instantiation of PDFDocument very long. 60 seconds for the attached pdf file. (Less than one second for http://www.codeproject.com/csharp/MgPDFReader.asp). > >Moreover, I regret that I don’t have access to the Type of field. > >I wanted to do this: > >foreach (IPDFField iField in form.Fields) > >{ > > Syncfusion.Pdf.Implementation.Parsing.PDFLoadedField field = iField as Syncfusion.Pdf.Implementation.Parsing.PDFLoadedField; > > if ((field != null) && (field.Type == PDFFieldTypeEnum.TextField)) > > { > > […] > > } > >} > >But the class Syncfusion.Pdf.Implementation.Parsing.PDFLoadedField is inaccessible due its protection level. > >

12254-02-2.zip


AJ Ajish Syncfusion Team June 6, 2006 09:39 AM UTC

Hi Mezil, It is possible in Essential PDF to get type of field and then fille value for each field. Here is code to do this IPDFForm form = ldoc.Form; foreach( IPDFField field in ldoc.Form.Fields ) { IPDFLoadedField lfield = field as IPDFLoadedField; if( lfield != null && lfield.Type == PDFFieldTypeEnum.TextField ) { lfield.Value = "Hello"; } } Here is a sample for your reference: FillForm.zip Please take a look at the sample and let me know if you have any other questions. Regarding the time taken to the pdf file to generate it takes 8~10 secs in my system. However I will investigate on this issue and send you an update soon. Thanks, Ajish.


MM Mattieu Mezil June 6, 2006 10:20 AM UTC

Thanks. M. MEZIL >Hi Mezil, > >It is possible in Essential PDF to get type of field and then fille value for each field. Here is code to do this > > > >IPDFForm form = ldoc.Form; > >foreach( IPDFField field in ldoc.Form.Fields ) >{ > IPDFLoadedField lfield = field as IPDFLoadedField; > if( lfield != null && lfield.Type == PDFFieldTypeEnum.TextField ) > { > lfield.Value = "Hello"; > } >} > > >Here is a sample for your reference: FillForm.zip > >Please take a look at the sample and let me know if you have any other questions. Regarding the time taken to the pdf file to generate it takes 8~10 secs in my system. However I will investigate on this issue and send you an update soon. > >Thanks, >Ajish. >

Loader.
Up arrow icon