Pdf specification step down conversion error

I have tried tu use PdfFileEditor to step down convert pdf format to 1.4 during file concatenation but I have failed. When I’m using external pdf it’s ok. But if I use pdf file that was edited my Aspose.Pdf it fails, Adobe Acrobat reports it’s still in 1.7 version format. I have checked pdf conent and it seems that top hader was correctly changed to 1.4 but little bit lower there is additional information that files is in 1.7 version (check atached screen). Tested with Aspose.Pdf 7.4. Unit test at the bottom.

Other problem that bothers me is that if I open existing file with Document class do/or don’t do some modifications and save it, file is always saved in 1.7 format.
Ex.

Documnet doc = new Document(“input.pdf”);
doc.Save(“output.pdf”);

Is there any way persevere original document format?


[Test]
public void Create_1_4()
{
string[] files = { “1.pdf”, “2.pdf”, “3.pdf” };
foreach (var file in files)
{
using(FileStream fs = new FileStream(file,FileMode.Create))
{
Document doc = new Document();
doc.Pages.Add();
doc.Save(fs);
}
}

PdfFileEditor pfe = new PdfFileEditor();
pfe.ConvertTo = PdfFormat.v_1_4;
pfe.Concatenate(files, “1.4.pdf”);
}

Regards
Jacek Bator

Hi Jacek,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the details and sample code.

I am able to reproduce your mentioned issue after an initial test. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-34524. You will be informed via this forum thread regarding any updates against your reported issue.

Also, please confirm if you need this issue to be treated under normal support or enterprise support?

Sorry for the inconvenience,

Hi Nausherwan,

The question is if you are able to fix it in 7.5? If so then it would be good if you can treat it as Enterprise Support request.

If not then I’m short on time and will have to find other workaround so in this case treat it as normal support.

And what about my second question? Is there any way to preserve source format when editing document with use of Document class?

Regards
Jacek Bator

Hi Jacek,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

JacekBator:

The question is if you are able to fix it in 7.5? If so then it would be good if you can treat it as Enterprise Support request.

If not then I'm short on time and will have to find other workaround so in this case treat it as normal support.

Well, we have already released Aspose.Pdf for .NET v7.5 yesterday, so this cannot be included in that version. So, as per your above comments, I will keep it under normal support.

JacekBator:

And what about my second question? Is there any way to preserve source format when editing document with use of Document class?

I tested the above scenario with the latest version of Aspose.Pdf for .NET v7.5 and I am unable to reproduce the problem. Please share your template PDF file to reproduce the issue.

Sorry for the inconvenience,

Hi Nausherwan,

I have retested it with 7.5 and it seems that it was fixed in this release.

Documentation is short on this topic so I have one more question. What is relay going under the hood? If I set

PdfFileEditor pfe = new PdfFileEditor();
pfe.ConvertTo = PdfFormat.v_1_4;

does Aspose relay converts document to 1.4 specification removing/altering all non-compatible elements or it only changes header version information?

Regards
Jacek Bator

Hi Jacek,


I am in coordination with development team to get insight about this feature and will get back to you soon. Please be patient and spare us little time.
Hi Jacek,

Please note that during version conversion, not only the version information is changed but objects inside PDF file are also transformed. Please continue using our product and in case you face any problem or you have any further query, please feel free to contact.

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.