Is it possible to create a PDF file, which will have one image on each of its pages, without the need to set the list of image resources before creating the first page. (this would make code conversion a lot easier for me)
i.e. I would like to do this
Code: Select all
If Imaging1.PdfNewPdf(App.Path & "\demo.pdf", "Title", "Creator", "Author", "Producer") Then
Imaging1.PdfSetMeasurementUnits (2) 'measure unit is centimeters
'Page 1
Call Imaging1.PdfSetPageDimensions(20, 15) 'Pages dimensions will be 20 x 15 cm
Imaging1.PdfNewPage
'ADD THE RESOURCE AFTER NEW PAGE
nImageID = Imaging1.PdfAddImageFromFile(App.Path & "\Nénuphars.jpg")
If nImageID <> 0 Then
Call Imaging1.PdfDrawImage(nImageID, 10, 10, 3, 2.5)
End If
'Page 2
Call Imaging1.PdfSetPageDimensions(20, 15) 'Pages dimensions will be 20 x 15 cm
Imaging1.PdfNewPage
'ADD THE RESOURCE AFTER NEW PAGE
nImageID2 = Imaging1.PdfAddImageFromFile(App.Path & "\XYZ.jpg")
If nImageID2 <> 0 Then
Call Imaging1.PdfDrawImage(nImageID2, 10, 10, 3, 2.5)
End If
john