How to embed image in PDF using cfpdfform

I am dynamically generating a PDF with several variables, but should also be able to embed an image in a PDF. Does anyone have experience using this?

+5
source share
2 answers

You are using a regular HTML image tag.

However, for good print quality images, you need to use a larger image than you would use in a document.

For instance:

<img src="/path/to/my_picture.1280x800.jpg" style="width:320px;height:200px;" />

, / 4 , (, , , ).

PDF, , CSS in cm , - , . ( 160 px: )

<img src="/path/to/my_picture.1280x800.jpg" style="width:8in;height:5in;" />


- , - (?) PDF, , , .

+2

html . .

<cfset photoLink = "D:\........\example.jpg"> 
<cffile action="readbinary" file="#photoLink#" variable="binAgentPhotoFile"> 
<cfinvokeargument name="photoFile" value="#toBase64(binAgentPhotoFile)#"/>

.

0

All Articles