Hi,
My code to add image file into the new PDF file, but it seems too large size for the PDF file. is anyway to set the resolution in the pdf page or compress it.
Here is the same code, however, I don’t know how to set the resolution or quality:
int lowerLeftX = 10;
int lowerLeftY = 10;
int upperRightX = 550;
int upperRightY = 800;
Aspose.Pdf.Rectangle rectangle = new Aspose.Pdf.Rectangle(lowerLeftX, lowerLeftY, upperRightX, upperRightY);
Matrix matrix = new Matrix(new double[] { rectangle.URX - rectangle.LLX, 0, 0, rectangle.URY - rectangle.LLY, rectangle.LLX, rectangle.LLY });
page.Contents.Add(new Aspose.Pdf.Operators.ConcatenateMatrix(matrix));
XImage ximage = page.Resources.Images[page.Resources.Images.Count];
page.Contents.Add(new Aspose.Pdf.Operators.Do(ximage.Name));
page.Contents.Add(new Aspose.Pdf.Operators.GRestore());