Free Support Forum - aspose.com

Using PdfFileEditor.makeNUp automatically rotates PDF upon merge

Hello


I am using PdfFileEditor.makeNUp to merge 2 pdf pages in one. But my problem right now is that if I use a PDF with landscape orientation, when I use the it to makeNUp, they are automatically converted to portrait orientation (rotated 90 counter clockwise), and merges the 2 pdf. I understand that Aspose PDF is maximizing the space of the paper but is there a way where it would retain the original orientation of the pdf after using makeNUp?

Thank you

Hi there,


We are sorry for the inconvenience. We will appreciate it if you please share your sample code along with input/output documents here, it will help us to replicate your issue exactly and address it accordingly.

Best Regards,

Hi,

For this case, us are using the one large file (420 x 297 mm), a a4 file (210 x 297 mm) and the code below (the files for are attached):

//Directory where the file are locate
String workingDir = “insertWorkDirHere… C:/…”;
//New PdfFileEditor
PdfFileEditor fileEditor = new PdfFileEditor();
//New Output File
FileOutputStream os = new FileOutputStream(workingDir + “output.pdf”);
//New array of InputStream
InputStream[] input = new InputStream[2];
//The first inputStream
input[0] = new FileInputStream(workingDir + “large_file.pdf”);
//The second inputStream
input[1] = new FileInputStream(workingDir + “a4_file.pdf”);
fileEditor.makeNUp(input, os, true);

In the output.pdf file the page of the large_file.pdf has been rotated. Is there any way to not execute page rotation?

Thank you.

a4_file.pdf (61.1 KB)
output.pdf (219.8 KB)
large_file.pdf (164.7 KB)

@ipm.aspose

Thank you for contacting support.

We have worked with the data shared by you and have been able to reproduce the issue in our environment. A ticket with ID PDFJAVA-37794 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.