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.

Mon Jun 17, 2024 4:00 am

Hi,
When we edit the file via Spire.PDF, Spire.PDF removes the borders.

Manually edited;
manually_edited.png


Spire.PDF
spire_pdf_edited.png


Code: Select all
using (PdfDocument pdfDocument = new PdfDocument())
{
    pdfDocument.LoadFromStream(source);
    PdfFormWidget formWidget = pdfDocument.Form as PdfFormWidget;
...
for (int i = 0; i < formWidget.FieldsWidget.List.Count; i++)
{
    PdfField field = formWidget.FieldsWidget.List[i] as PdfField;
    ....
    switch (field)
    {
        case PdfTextBoxFieldWidget textbox:
        (value, tagFound) = GetMatchingField(value, tagHash);
        textbox.Text = value;
        ....

pdfDocument.SaveToStream(output, Spire.Pdf.FileFormat.PDF);


Please let us know if there is a workaround or hotfix we can use.

Note: Using .NET 4.8 with Spire.PDF 10.3.7

djacobs111
 
Posts: 19
Joined: Mon Aug 01, 2016 6:13 pm

Mon Jun 17, 2024 5:50 am

Hello,

Thanks for your inquiry.
For your issue, to help us investigate further, please provide us with your pdf file. You can upload it to the attachment here or send it to this email address: support@e-iceblue.com. Thanks in advance.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Tue Jun 18, 2024 3:24 am

Hello,

Thanks for your file.
I modified the code snippet you provided and tested your case with version Spire.PDF 10.3.7, but failed to reproduce the issue you mentioned. Since the code you provided is not complete, we speculate that you may have made other changes to your pdf and caused your issue. I attached my test code and result pdf file for your reference. If the issue still exists on your side, please share us with your complete test code to help us investigate further. Thanks in advance.
Code: Select all
string[] texts = new string[] { "123","45","6789" };
using (PdfDocument pdfDocument = new PdfDocument())
{
    pdfDocument.LoadFromFile("Form SSA-1696_Page_3.pdf");
    PdfFormWidget formWidget = pdfDocument.Form as PdfFormWidget;

    for (int i = 0; i < 3; i++)
    {
        PdfField field = formWidget.FieldsWidget.List[i] as PdfField;

        if (field is PdfTextBoxFieldWidget)
        {
            PdfTextBoxFieldWidget textBoxField = (PdfTextBoxFieldWidget)field;
            textBoxField.Text = texts[i];
        }
    }
    pdfDocument.SaveToFile("result.pdf");
}

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Tue Jun 18, 2024 5:47 pm

Hi William,
If you view that PDF on Adobe Reader, it shows, but on print, it does not appear. Also, on any browser, the Adobe Reader extension does not show in print and on the UI. Could you confirm this?

djacobs111
 
Posts: 19
Joined: Mon Aug 01, 2016 6:13 pm

Wed Jun 19, 2024 1:37 am

Hello,

Thanks for your feedback.
Yes, when I print the result document with Adobe or open it with a browser, I do find the issue you mentioned. I have logged this issue to our tracking system with ticket SPIREPDF-6848. Our dev team will investigate further and fix it, and I will keep you informed once there is any progress. Sorry for the inconvenience.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Mon Jul 01, 2024 2:46 pm

Hi William,
Following up with SPIREPDF-6848

djacobs111
 
Posts: 19
Joined: Mon Aug 01, 2016 6:13 pm

Tue Jul 02, 2024 8:50 am

Hello,

Thanks for your following up.
Regarding issue SPIREPDF-6848, our development team is working on it, but it has not been fully resolved yet. We will urge them to speed up the process. Thank you for your understanding.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Thu Aug 01, 2024 8:50 am

Hello,

Thank you for your patience.
Glad to inform that we just released Spire.PDF Pack(Hot Fix) Version:10.7.21 which fixed the issue of SPIREPDF-6848, welcome to test it.
Website link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget link: https://www.nuget.org/packages/Spire.PDF/

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Fri Aug 23, 2024 5:27 am

The issue has been resolved in version 10.7.21. Thank you for addressing it.

djacobs111
 
Posts: 19
Joined: Mon Aug 01, 2016 6:13 pm

Return to Spire.PDF