Hi all,
I donโt know the best way for create a single pdf file from multi file image, in file pdf each image is each page
Who can tell me solution, if have code demo is good
Thanks
Hi there,
// Instantiate Document Object<o:p></o:p>
Document doc = new Document();
// Add a page to pages collection of document
Page page = doc.Pages.Add();
// Create an image object
Aspose.Pdf.Image image = new Aspose.Pdf.Image();
// Add the image into paragraphs collection of the section
page.Paragraphs.Add(image);
// Set the image file stream
image.File=myDir+"test.bmp";
// Add another page to pages collection of document for second image
Page page1 = doc.Pages.Add();
// Create an image object
Aspose.Pdf.Image image1 = new Aspose.Pdf.Image();
// Add the image into paragraphs collection of the section
page1.Paragraphs.Add(image1);
// Set the image file stream
image1.File = myDir + "test_out.bmp";
// Save resultant PDF file
doc.Save(myDir+"Image2PDF_DOM.pdf");
Please feel free to contact us for any further assistance.
Best Regards,