Integrate image in PDF-Template

krichel

New member
How do I integrate Images in PDF templates?

With
dadabik_field image dadabik_field
the renderer uses a lot of time but does not even print the file name.
 

eugenio

Administrator
Staff member
Hello,
is this request linked to the one you did about IE 11?
I mean do you have issues only on IE 11?

Best,
 

eugenio

Administrator
Staff member
I guess "image" is the correct field name in the db, am I right?

If you use the standard template (no custom template), do things change?

Did you change anything in the code? Maybe in the TCPDF code (the version used in DaDBIK is slightly different from the original version)?

Best,
 

krichel

New member
I didn't change the TCPDF Code(It is all in the Dadabik folder, I suppose?)

If I define the field as "generic file", the images is not shown on the screen, but print works fine. The images are simple Jpeg, not too big. (between 40kB and 900kB)
 

eugenio

Administrator
Staff member
krichel Wrote:
-------------------------------------------------------
> I didn't change the TCPDF Code(It is all in the Da
> dabik folder, I suppose?)

Yes.

> If I define the field as "generic file", the ima
> ges is not shown on the screen, but print works fi
> ne. The images are simple Jpeg, not too big. (betw
> een 40kB and 900kB)

If you use the standard template (no custom template), do things change?

Best,
 

krichel

New member
No, the same.
But now I get the message "TCPDF ERROR: [Image] Unable to get the size of the image: " etc.
 

eugenio

Administrator
Staff member
Hello,
do images work on the normal application (not on PDF)?
From the error message my guess is that there are problems showing images in general.

Best,
 

eugenio

Administrator
Staff member
So, to summarize:

- if you set the field as image_file you get TCPDF ERROR: [Image] Unable to get the size of the image: " in PDF but you see the picture in the Web view

- if you set the fields as generic_file, you said the image is not shown on the screen (and this is how it should be), but print works fine: what do you mean with print works fine? With generic_file, you shouldn't see the image, just a link to the file.

Have you set the parameter $site_url or $site_path in config.php? Is your application publicly accessible? If yes, can you post the URL?

Best,
 

krichel

New member
eugenio Wrote:
-------------------------------------------------------
> So, to summarize:
>
> - if you set the field as image_file you get TCPDF
> ERROR: [Image] Unable to get the size of the image
> : " in PDF but you see the picture in the Web view

Exactly

> - if you set the fields as generic_file, you said
> the image is not shown on the screen (and this is
> how it should be), but print works fine: what do y
> ou mean with print works fine? With generic_file,
> you shouldn't see the image, just a link to the fi
> le.

Now the generic file settig works as it should

> Have you set the parameter $site_url or $site_path
> in config.php? Is your application publicly access
> ible? If yes, can you post the URL?

I have not set these parameters. The application is not publicly accessible, but I could provide you the credentials per mail.
 
Top