Render Image

The make_image function allows to render an image on a page of a PDF documents.

Please find the sample code below:


Dim pdf
Dim pdfpath
Dim tsleft
Dim tstop
Dim tswidth
Dim tsheight
Dim imgpath


pdfpath="d:\DCP_5471.pdf"
imgpath="d:\DCP_5471.JPG"
targetpdf = "d:\output.pdf"

tsleft = 30
tstop = 400
tswidth = 200
tsheight= 200

Set pdf = CreateObject("aloahapdf.edit")

If pdf.load_pdf_to_mem(CStr(pdfpath)) = true Then 
  pdf.currentpage=1
  If pdf.make_image(CDbl(tsLeft), CDbl(tsTop), CDbl(tsWidth), CDbl(tsHeight), CStr(imgpath)) = true Then
    If pdf.save_pdf_to_file(CStr(targetpdf)) = true Then
        MsgBox "OK"
    End If
  End If
End If

Set pdf = nothing


Aloaha Software / Knowledge Base / PDF SDK / Render Image

Download PDF SDK


Incremental Image

Learn here how to add an incremental image to a signed document without invalidating the signature
create PDF Software

Render Image

Any questions?
Aloaha Software - Render Image
ProductsKnowledge BaseShopSupportPress
Deutsche VersionEnglish version