Free Support Forum - aspose.com

Reg: PDF problem when page size changed

I am facing a problem with Aspose pdf when I try to convert pdf containing HTML content of page size 8.5X11 to other page sizes using pdf file editor or makeNUp it is getting empty pages when I use the pdf with Adobe and try to print.

would you please assist me regarding this?

Please find the attachments for your reference.ResizedPDF.pdf (237.3 KB)
8_5X11WithHTML_Source.pdf (237.5 KB)

@NKChari

Would you please also share the sample code snippet which you are using to resize the PDF along with an expected output PDF. We will test the scenario in our environment and address it accordingly.

                leftpdf.Save(leftms);
                rightpdf.Save(rightms);

                var output = new MemoryStream();

                var pdfFileEditor = new Aspose.Pdf.Facades.PdfFileEditor();

                pdfFileEditor.MakeNUp(new[] { leftms, rightms }, output, true);
                output.Position = 0;

                var output11X17 = new Aspose.Pdf.Document(output);
                output11X17.PageInfo.Height = Aspose.Pdf.PageSize.P11x17.Height;
                output11X17.PageInfo.Width = Aspose.Pdf.PageSize.P11x17.Width;
                output11X17.PageInfo.Margin = new Aspose.Pdf.MarginInfo(0, 0, 0, 0);

rightpdf.pdf (48.5 KB)
leftpdf.pdf (592.2 KB)
output11X17.pdf (639.9 KB)

@NKChari

We tested the scenario in our environment with Aspose.PDF for .NET 20.12 and we obtained similar output as output11X17.pdf which you have shared. However, we were unable to notice any issue as the output was according to the supplied input documents. Furthermore, upon printing the output with Adobe, we received attached document.

printed.pdf (636.8 KB)

Could you please highlight the issues in the attached file or share an expected output PDF which you want to obtain using the API. We will further proceed to assist you accordingly.

I am using Aspose.PDF 19.2 version.

Attaching files are resized using MakeNUp as I mentioned in the code earlier.

Following are 2 sample expected outputs with their corresponding input files.
output11X17.pdf is an issue file.
output11X17_2.pdf generated properly.

rightpdf.pdf (124.8 KB)
leftpdf.pdf (169.1 KB)
output11X17.pdf (274.9 KB)

rightpdf_2.pdf (2.2 KB)
leftpdf_2.pdf (2.5 KB)
output11X17_2.pdf (4.2 KB)

@NKChari

We were able to reproduce the issue in our environment while using Aspose.PDF for .NET 20.12. Therefore, have logged it as PDFNET-49254 in our issue tracking system. We will further investigate it and keep you informed about its resolution status. Please be patient and spare us some time.

We are sorry for the inconvenience.