We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Pdf.Facade.PdfFileEditor NUp is producitng blank file

Hi,

I was evaluating the NUp ability of the Pdf.Kit package and found that it worked great. But after changing to tsting the Pdf package ( as these have supposed to have been merged ) i find that the functionality is not working.

The following is Pdf.Kit code and it works:

Aspose.Pdf.Kit.PageSize pageSize = Aspose.Pdf.Kit.PageSize.A4;
pageSize.IsLandscape = true;
Aspose.Pdf.Kit.PdfFileEditor pfe = new Aspose.Pdf.Kit.PdfFileEditor();

Stream inputStream = new FileStream(sourceFileName, FileMode.Open, FileAccess.Read);
Stream outputStream = new FileStream(destinationFileName, FileMode.Create, FileAccess.Write);

//make N-Up from 13page.pdf to N-Up.pdf
if (pfe.MakeNUp(inputStream, outputStream, 2, 1, pageSize) == false)
{
throw new Exception(“PDF NUp Error”);
}

inputStream.Close();
outputStream.Close();


The Following is the Pdf code and it produces a blank pdf:

// Using the New Facades
Aspose.Pdf.Facades.PageSize pageSize = Aspose.Pdf.Facades.PageSize.A4;
pageSize.IsLandscape = true;
Aspose.Pdf.Facades.PdfFileEditor pfe = new Aspose.Pdf.Facades.PdfFileEditor();
Stream inputStream = new FileStream(sourceFileName, FileMode.Open, FileAccess.Read);
Stream outputStream = new FileStream(destinationFileName, FileMode.Create, FileAccess.Write);

//make N-Up from 13page.pdf to N-Up.pdf
if (pfe.MakeNUp(inputStream, outputStream, 2, 1, pageSize) == false)
{
throw new Exception(“PDF NUp Error”);
}

inputStream.Close();
outputStream.Close();


I have tried 6.3.0.0, 6.2.0.0 of the Aspose.Pdf product and none work. The input files are the same for both testing.

Is this simply broken or am i doing something wrong?

Hi Stephen,

Thanks for using our products.

I have tested the scenario while using one of my sample PDF documents and I am unable to notice any problem when tested with Aspose.Pdf for .NET 6.3.0. The issue seems to be input PDF specific. Can you please share the source PDF document so that we can test the scenario at our end. We apologize for your inconvenience.

I have attached three pdfs.
Two are the result of running the code using both the facade and kit. And the third is the source pdf file.

Regards,
Stephen Cossgrove

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

Thank you for sharing the template and resultant files.

I have tested your scenario with your template file and sample code of Aspose.Pdf.Facades and it works fine (attached is the resultant file for your reference). I think the issue may be occurring because of the evaluation mode. Please use the below link to acquire a temporary license (choose “Get a Temporary License” option) for testing of the product.

http://www.aspose.com/purchase/default.aspx

Please feel free to contact support in case you face any problem.

Thank You & Best Regards,