Free Support Forum -

Compression of PDF while Appending/Merging


Please find my code

Aspose.Words.Document doc1 = new Aspose.Words.Document(FileUpload1.PostedFile.InputStream);

Aspose.Words.Document doc2 = new Aspose.Words.Document(FileUpload2.PostedFile.InputStream);

Aspose.Words.Rendering.PdfOptions pdfOpt = new Aspose.Words.Rendering.PdfOptions();

pdfOpt.TextCompression = Aspose.Words.Rendering.PdfTextCompression.Flate;

//pdfOpt.JpegQuality = 10; Support from V 7.0.0 onwards

//doc1.SaveToPdf(Server.MapPath("~") + @"\Temp\p1.pdf");

doc1.SaveToPdf(0, doc1.PageCount, Server.MapPath("~") + @"\Temp\p1.pdf", pdfOpt);


//doc2.SaveToPdf(Server.MapPath("~") + @"\Temp\p2.pdf");

doc2.SaveToPdf(0, doc2.PageCount, Server.MapPath("~") + @"\Temp\p2.pdf", pdfOpt);

//Club two PDF into Single PDF

Aspose.Pdf.Kit.PdfFileEditor pdfEditor = new Aspose.Pdf.Kit.PdfFileEditor();

int start = 0;

int end = 1000;

pdfEditor.Append(Server.MapPath("~") + @"\Temp\p1.pdf", Server.MapPath("~") + @"\Temp\p2.pdf", start, end, Server.MapPath("~") + @"\Temp\combine.pdf");

System.IO.File.Delete(Server.MapPath("~") + @"\Temp\p1.pdf");

System.IO.File.Delete(Server.MapPath("~") + @"\Temp\p2.pdf");

Here I want to acheive compression, because my both p1.pdf & p2.pdf can be very rich PDF file(Full of Images and Text).

I want to compress combine.pdf

The version of Aspose.Pdf.Kit is

Please suggest how can I achieve this.



Hi Siraj,

I’m sorry to inform you that this feature is currently not supported by Aspose.Pdf.Kit. However, we have already logged this feature as PDFKITNET-9979 in our issue tracking system. We’ll update you once this functionality is available in the component.

We’re sorry for the inconvenience.

The issues you have found earlier (filed as 9979) have been fixed in this update.

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