|
Inserting Images PDFReport XP supports images in BMP, JPG, WMF and ICO formats; it recognizes the file type using the extension, so you have to use just one routine to get everything done. Every image is internally converted to JPG, so you can choose to insert it with the compression level and the quality you prefer (if quality = 100 then the image is almost perfect, untouched, while with quality = 5 for example you get a not so good image but the file size is minimal). Here's the syntax: PDFRPT.ImportImage FileName, Quality, Left, Top, ImageWidth, ImageHeight This code for example shows this PDF: Private Sub Command9_Click() Dim PDFRPT As New PDFDocument PDFRPT.NewPDF "This is my first PDF" PDFRPT.ImportImage "d:\splash.jpg", 80, 10, 10, 200, 200 PDFRPT.SavePDF "c:\provaocx.pdf" End Sub This code meaning is: import the file "d:\splash.jpg", use JPG quality = 80 (high quality) when compressing, draw it 200 mm large and 200 mm tall, on the current page at 10 mm from the left border of the page and 10 mm from the top (this as the current UnitOfMeasure is "mm"). |