Some fields get the font modified or carriage returns are no more displayed correctly when saving a PDF file

Hello,

In our application, we encounter an issue when saving a PDF file : some fields get the font modified or carriage returns are no more displayed correctly. This happens when merging more than one page (page two and more should have the same page settings than page one)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Here is an example :

The fields « Type d’intervention » and « Description » have been modified

PDF files are linked to this post (Fiche complete-before-rename.pdf and Fiche complete-after-rename.pdf)

Dim pEditor As Aspose.Pdf.Facades.FormEditor

Dim pfile As Uri

pfile = New Uri(mpCurrentFile.LocalPath)

pEditor = New Aspose.Pdf.Facades.FormEditor()

pEditor.BindPdf(mpCurrentPdfDocument)

For Each fieldName As Aspose.Pdf.InteractiveFeatures.Forms.Field In mpCurrentPdfDocument.Form.Fields

If fieldName.PartialName.IndexOf(prefixFilter) = -1 Then

pEditor.RenameField(fieldName.FullName, AddSuffixeToPartialName(fieldName.PartialName, suffix))

End If

Next

pEditor.Save(pfile.LocalPath)

pEditor.Close()

pEditor = Nothing

We get the same behaviour when we try to copy a PDF file into another one :

The file before Copy is OK but when it is copied into another one, the fields « Type d'intervention » and « Description » have been modified

PDF files are linked to this post (Fiche complete-Before_Copy.pdf, Fiche complete-page_to_add.pdf, Fiche complete-After_Copy.pdf)

Private Sub CopyPagesTo(ByVal targetUri As System.Uri)

Dim pTargetDoc As Aspose.Pdf.Document

pTargetDoc = New Aspose.Pdf.Document(targetUri.LocalPath)

pTargetDoc.Pages.Add(mpCurrentPdfDocument.Pages)

pTargetDoc.Save(targetUri.LocalPath)

End Sub

Would you have any idea to solve our issue ?

Hi Samuel,

We are sorry for the inconvenience caused. While testing the scenario with the latest version of Aspose.Pdf for NET 8.8.0, We have managed to reproduce the reported issue in concatenation process and logged it in our bug tracking system as PDFNEWNET-36374 for further investigation and resolution. But I am afraid we are unable to test form field rename scenario as it has some missing reference. Please share detail about prefixField value, so we will test the scenario as well.

Please feel free to contact us for any further assistance.

Best Regards,

Hi,

I am glad you succeed in reproducing our case. Do you think there is a workaround to this issue by using an older version of the API ?
Are there other ways to use the API using another coding method ?

Best Regards,

Samuel

Hi Samuel,


Thanks for your feedback. As a workaround you can use PdfFileEditor class of Aspose.Pdf.Facades package to concatenate PDF documents. Please check following documentation link for concatenation operation, hopefully it will help you to accomplish the task.


Please feel free to contact us for any further assistance.

Best Regards,

Hi,

I tried to use the concatenation class you mentioned but it does not work basically with 2 simple PDF files. Could you tell me how you get the result "merged.pdf" you posted in your previous answer ? Would you have any samples to provide me with or other class that could be used ?

In another hand, could you tell me when the bug will be fixed into a version ?

It is very important since we have customers that are impacted by this bug and we have no workaround to solve their issue.

Regards

Hi Samuel,


Thanks for your inquiry. I'm afraid the above reported issue is still not resolved, its pending for investigation in the queue with other priority tasks. However, we have requested our development team to complete its investigation and share an ETA at their earliest. We will update you via this forum thread as soon as we get a feedback.


Moreover, Please find below the code snippet used to generate above shared file.


PdfFileEditor pdfEditor = new PdfFileEditor();

bool b = pdfEditor.Concatenate(new String[] { myDir + "Fiche+complete-Before_Copy.pdf", myDir + "Fiche+complete-page_to_add.pdf"}, myDir + "merged.pdf");

Please feel free to contact us for any further assistance.


Best Regards,

The issues you have found earlier (filed as PDFNEWNET-36374) have been fixed in Aspose.Pdf for .NET 9.7.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.