Hi
I am trying the new function "C$PDF" for runtime 10.2
I am trying to add a jpg image to a pdf file - but I am having trouble.
When executing I get an error: Invalid or missing parameter to "C$PDF" using hpdf-page-drawimage
Is there anyone who can see what I'm doing wrong ?!
program-id. pdf.
* Runtime version 10.2.0 or newer is necessary !
data division.
working-storage section.
01 file-status pic s9(2).
procedure division.
main section.
* Check if image exists
giving file-status
end-call
display message "File doesn't exists: "
hpdf-jpeg-filename
icon 3
end-if
* Create new document
call "c$pdf" using hpdf-new
hpdf-user-data
giving hpdf-doc
end-call
hpdf-doc
hpdf-jpeg-filename
giving hpdf-jpeg-image
end-call
* Add new page
hpdf-doc
giving hpdf-page
end-call
call "c$pdf" using hpdf-page-drawimage | <-- ERROR
hpdf-page
hpdf-jpeg-image
1 | x
1 | y
100 | width
100 | height
end-call
* Save to file (overwrite if it already exists)
hpdf-doc
hpdf-savefilename
end-call
call "c$pdf" using hpdf-free
hpdf-doc
.
goback.