Hello

I use wkhtmltopdf on Windows, thanks to flebas for explanation: http://drupal.org/node/521776

I successfully create a PDF file but no image appears, just a blank frame for each image.

I can execute wkhtmltopdf manually with success on the server. The only difference is the input method: stdin failed and file successed.

Comments

dsy73’s picture

Ok, I found something weird, the stdin stream give a web page with bad path for images. Each image source path have mixed symbols \ and / because of Windows.
For example: src=c:\drupal\sites\default\files/images/test.png

But I don't know how to correct the path encoding for all images.

dsy73’s picture

I resolve the path problem but the bug remains, I have no image in PDF.

Nosfe’s picture

I think it's not an issue of wkhtmltopdf, with dompdf occurs the same, no image neither although printer-frindly shows it correctly and using same template.

dsy73’s picture

Yes, you are right: dompdf and wkhtmltopdf have the broken image bug, not tcpdf.

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

There may be other issues here.. Both dompdf and wkhtml will try to do what a web browser would do: access your images via the network. However, it's running inside your web server.

TCPDF tries to access the files directly at the local filesystem if it can determine that the URL corresponds to a local location.

Maybe you have to configure the access permissions of your webserver/firewall or something similar.

dsy73’s picture

Finally, images are displayed in PDF with wkhtmltopdf after debugging the HTML content: I just remove the code to transform URL (http://) to absolute local path (file://). I don't know why it works, it is just a workaround.

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

No further info in two weeks. Closing the issue.

saranNV’s picture

Issue summary: View changes

I having an issue working on Rails app with wkhtmltopdf,the image are not displaying on pdf, which is an uploaded file from the app inside tinymce editor.the image src is like this src="projects/1/files/1/preview"

helps are welcome