I would like the export set of images to pdf, and each of my images are having its own x and y postions, how to do that in the aspost.pdf.generator, Is there any sample for this ?
Hi Arun,
// Open document<o:p></o:p>
//Document pdfDocument = new Document("input.pdf");
Document pdfDocument = new Document();
// Set coordinates
int lowerLeftX = 100;
int lowerLeftY = 100;
int upperRightX = 200;
int upperRightY = 200;
// Get the page where image needs to be added
//Page page = pdfDocument.Pages[1];
Aspose.Pdf.Page page = pdfDocument.Pages.Add();
....
....
I want to get the image position, exactly where it will added in the page, when I write page.Paragraphs.Add(img)
I want to calculate if the image fits in the available page empty area or I need to create a new page and add it.
The image type is SVG so it overflows it the image does not fit in the page.
Please reply at your earliest
We would like to share with you that Paragraph
class does not expose any property that can be used to determine location of any paragraph. Paragraphs are added in Flow layout (Top to Bottom). In case you want to add an image on a PDF page at specific position, you may add it as an ImageStamp
while setting XIndent
and YIndent
properties as per your requirements. For further information on this, you may visit Adding Image Stamp in PDF File for your kind reference.