Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Sat Nov 30, 2013 10:40 am

Hello,

I am investigating the possibilities of their program.
Your program can display a PDF on a Windows Form.
In addition I have the used you command and Display a pdf file on my form works.
But this PDF file is a PDF file with input fields. The user should fill out these fields and after filling this file have to saved in a database.

Unfortunately I can after opening the this PDF file not edit.

Is that possible with your component?

I have a test PDF file attached. I want to access and edit and then save this file.

Regards

Janos

donald67
 
Posts: 1
Joined: Thu Nov 28, 2013 10:50 am

Mon Dec 02, 2013 3:25 am

Dear Janos,

Thanks for your interested in our products.
We got your PDF file via e-mails. Sorry that there is a bug that the field in your PDF file could not be read when we try to open it. We have posted the bug to our dev team. Once the bug is fixed, we will tell you at first.
Thanks for your support and have a nice day.
Any question, just let us know.

Best regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Thu Dec 12, 2013 8:35 am

Dear Janos,

Thanks for your waiting.
The bug has been fixed. Welcome to download and test Spire.PDF Pack Version:2.9(http://www.e-iceblue.com/Download/downl ... t-now.html).
Please refer to the following code to fill data for the fields in PDF.
Code: Select all
            PdfDocument document = new PdfDocument();
            document.LoadFromFile(@"..\..\test.pdf");

            PdfFormWidget formWidget = document.Form as PdfFormWidget;

            for (int i = 0; i < formWidget.FieldsWidget.List.Count; i++)
            {
                PdfField field = formWidget.FieldsWidget.List[i] as PdfField;
                if (field is PdfTextBoxFieldWidget)
                {
                    PdfTextBoxFieldWidget textBoxField = field as PdfTextBoxFieldWidget;
                    switch (textBoxField.Name)
                    {
                        case "Abteilung  Team":
                            textBoxField.Text = "Abteilung  Team";
                            break;
                        case "Datum":
                            textBoxField.Text = "Datum";
                            break;
                        case "Maschine  Linie  Teil":
                            textBoxField.Text = "Maschine  Linie  Teil";
                            break;
                        case "Beschreibung der SituationRow1":
                            textBoxField.Text = "Beschreibung der SituationRow1";
                            break;
                        case "Beschreibung der SituationRow2":
                            textBoxField.Text = "Beschreibung der SituationRow2";
                            break;
                        case "Beschreibung der SituationRow5":
                            textBoxField.Text = "Beschreibung der SituationRow5";
                            break;
                        case "Beschreibung der SituationRow6":
                            textBoxField.Text = "Beschreibung der SituationRow6";
                            break;
                        case "Beschreibung der SituationRow7":
                            textBoxField.Text = "Beschreibung der SituationRow7";
                            break;
                        case "Beschreibung der SituationRow8":
                            textBoxField.Text = "Beschreibung der SituationRow8";
                            break;
                        case "G x F x W":
                            textBoxField.Text = "GFW";
                            break;
                        case "Datum_2":
                            textBoxField.Text = "Datum_2";
                            break;
                        case "Datum_4":
                            textBoxField.Text = "Datum_4";
                            break;
                    }
                }

                if (field is PdfCheckBoxWidgetFieldWidget)
                {
                    PdfCheckBoxWidgetFieldWidget checkBoxField = field as PdfCheckBoxWidgetFieldWidget;
                    switch (checkBoxField.Name)
                    {
                        case "Check Box6":
                            checkBoxField.Checked = true;
                            break;
                        case "Check Box7":
                            checkBoxField.Checked = true;
                            break;
                        case "Check Box10":
                            checkBoxField.Checked = true;
                            break;
                        case "Check Box15":
                            checkBoxField.Checked = true;
                            break;
                        case "Check Box20":
                            checkBoxField.Checked = true;
                            break;
                    }
                }
            }
            document.SaveToFile("output.pdf");


Best regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Tue Dec 17, 2013 9:26 am

Dear Janos,

Have you tested Spire.PDF 2.9? Did it resolve your issue?
Thanks for your feedback.

Best regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF