Can User Edit Fields ?

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v5)  /  Can User Edit Fields ?

DynamicPDF CoreSuite for .NET (v5) Forum

 Dec 30 2011 11:14 AM
I have these products:

 - DynamicPDF v5.0.1 for .NET
 - FireMail v1.0.4 for .NET Evaluation Edition

I primarily use it for creating PDF-files - including information for program/database - defined forms using DynamicPDF Designer.
  
Is it somehow possible to Add TextFields so the User can Fill in extra information on the form before prinint - and even better, maybe it could be possible for the user to save the filled form ?

happy new year
Wagner Engineering
Flemming Wagner
 Dec 30 2011 11:51 AM
Posted by a ceTe Software moderator
Hello Flemming,

Yes, you can add form fields to the PDF report without any problem using our DynamicPDF product. You will need to place an PlaceHolder in the DPLX file and use the LaidOut event of the PlaceHolder to add the page elements dynamically to the PDF report. Please refer the documentation on handling events at: http://www.DynamicPDF.com/Support/NET_Help_Library_10_03/Handling%20Events.html. Also below is the sample code for it.

        //Code to generate PDF report.
        DocumentLayout report = new DocumentLayout(@"F:\temporary\DPLX\Version5.1.dplx");
            PlaceHolder placeHolderField = (PlaceHolder)report.GetReportElementById("Placeholder1");
            placeHolderField.LaidOut += new PlaceHolderLaidOutEventHandler(placeHolderField_LaidOut);
            Document document = report.Run();
            document.Draw(@"C:\MyDocument.pdf");

        //LaidOut event handler to add the form field to the PDF report.
        static void placeHolderField_LaidOut(object sender, PlaceHolderLaidOutEventArgs e)
        {
            TextField textField = new TextField("Text Field Name", 0, 0, e.ContentArea.Width, e.ContentArea.Height);
            textField.TextAlign = Align.Center;
            textField.BackgroundColor = RgbColor.AliceBlue;
            textField.BorderColor = RgbColor.DeepPink;
            textField.Font = Font.TimesItalic;
            textField.FontSize = 16.0f;
            textField.TextColor = RgbColor.Brown;
            textField.DefaultValue = "ceTe Software";
            textField.MultiLine = true;
            textField.ToolTip = "Text";
            e.ContentArea.Add(textField);
        }

Thanks,
ceTe Software Support Team.
 Dec 30 2011 12:01 PM
Posted by a ceTe Software moderator
Hello Flemming,

Regarding your question about saving the filled form generated using DynamicPDF, it is possible to save the filled form if you are using Adobe Acrobat Professional.

If you are using Adobe Reader, it is possible to print the filled form but it is not possible to save the filled form.

Thanks,
ceTe Software Support Team.
 Jan 04 2012 10:23 AM
Hello again

I have tried to do the examples for VB in the Example Referance:
But I get a NULL Referance Error:
(Object reference not set to an instance of an object. )

AddHandler MyBarcodePlaceHolder.LaidOut, AddressOf BarcodePlaceholder_LaidOut

Anyway: Could there be a more EZ way to define an UserEditable field in the .dplx-file - for example directly in the DynamicODF Designer ?

Regards
/FLEMMING 
 Jan 04 2012 11:01 AM
Posted by a ceTe Software moderator
Hello Flemming,

It is not possible to add form fields directly to the DPLX file using DynamicPDF Designer. You will have to add them dynamically using the Placeholder report element.

Regarding the error please send over full stack trace of the message, code which you are using or an sample application and the DPLX file to our support team at: support@cete.com so that they can look into it further.

Thanks,
ceTe Software Support Team.
 Jan 07 2012 2:25 PM
hello again

I have done som tests and it seems that I have "control on it" now.

Regards
FLEMMING

All times are US Eastern Standard time. The time now is 3:06 PM.