In our solution, we are cropping a portion of Front and back of the PDF document and saving it into a new PDF file. Currently, the new PDF generates fine. The requirement is to generate PDF pages as images. We want the new PDF to contain all the content as Image. Hope you understand my point.
Here is the code snipped of the program:
Aspose.Pdf.Document document = new Aspose.Pdf.Document(inputFileName);
Aspose.Pdf.Document outputPDF = new Aspose.Pdf.Document();
Aspose.Pdf.Document outputPDFDependant = new Aspose.Pdf.Document();
//Create the Copy of the page
outputPDF.Pages.Insert(1, document.Pages[1]);
outputPDF.Pages.Insert(2, document.Pages[2]);
Aspose.Pdf.Rectangle pageRect = new Aspose.Pdf.Rectangle(324, 754, 566, 610); outputPDF.Pages[1].CropBox = pageRect;
pageRect = new Aspose.Pdf.Rectangle(280, 759, 38, 615);
outputPDF.Pages[2].CropBox = pageRect;
outputPDF.Save("Output-1.pdf");
The pages inside output PDF should be rasterized i.e. saved as images (non editable). Please advice how to achieve this.