I am resizing pdf’s to normalize their content to all the same paper size, for example, resize a page size from A4 to Letter. For some documents the output is corrupted and returns the following error when you open with acrobat: “there was an error processing an annotation or link. there was a problem reading this document (16)”
Attached is sample input and the output used in the code example below.
string inputFile = @"d:\input\input.pdf";
string outFile = @"d:\output\output.pdf";
Document doc = new Document(inputFile);
PdfFileEditor fileEditor = new PdfFileEditor();
for (int i = 0; i < doc.Pages.Count; i++)
{
fileEditor.ResizeContents(doc, new int[] {i + 1},
PdfFileEditor.ContentsResizeParameters.PageResize(PageSize.PageLetter.Width,
PageSize.PageLetter.Height));
}
doc.Save(outFile);
We have tested the scenario in our environment and managed to replicate the same issue, which you have mentioned. However, when we tried to resize the Pages of document with DOM approach and Aspose.Pdf for .NET 17.12, the output PDF document was fine and no error message was prompted while opening the document in Adobe Reader. Following is the code snippet, which we have tried to test the scenario with DOM model.
For your kind reference, an output PDF document is also attached. Furthermore, we have also logged an issue related to Facades API as PDFNET-43947 in our issue tracking system. We will further investigate the issue in details and keep you updated with the status of its resolution. Meanwhile you may please use DOM approach with latest version of the API, which resolves the issue.
Thank you for the work around, unfortunately this does not resize the content. What I want to do is take a pdf that has a paper size of A4 and resize the content down to fit into Letter.
We have noticed your concerns and also observed same thing while checking the output PDF document, generated by suggested code snippet. We have updated the information of the issue in the logged ticket. As soon as we receive some significant updates regarding resolution of your issue, we will surely inform you. Please spare us little time.
We have checked the status of logged ticket and it is not yet resolved, as there are large number of pending issues in the queue which were logged prior to your issue. As soon as we have some definite updates regarding resolution progress of your issue, we will let you know. Please be patient and spare us little time.
I am afraid that earlier logged issues has not been yet resolved and we are not in position to share any reliable ETA for now, as there are other pending issues in the queue already. We will definitely provide a fix against your issue after resolving issues logged prior to yours. As soon as we have some definite update regarding resolution progress, we will let you know. We greatly appreciate your patience and comprehension in this regard. Please spare us little time.
I am afraid that earlier logged issue has not been yet resolved due to other pending issues in the queue. Please note that, issue has been logged under free support model and will be resolved on first come first serve basis. Also, please note that we do realize the significance of the issue and will definitely consider your concerns while fixing it. As soon as we make some significant progress towards resolution of the issue, we will let you know. Please spare us little time.
Regretfully the ticket is not yet resolved due to other high priority tasks and implementations to the API. However, we have recorded your concerns and will surley keep them in view while investigating the ticket. We will inform you as soon as we have some additional updates in this regard. Please spare us some time.