images in header/footer only allowed within dompdf folder

125 views
Skip to first unread message

Martin Thomas Schrott

unread,
Feb 16, 2011, 8:49:25 AM2/16/11
to dom...@googlegroups.com
Hi together,
 
I create a pdf file using dompdf 0.6 via the command line.
this works quite well with some little problems. here is one of them:
 
Images that are inserted with an inline php script on every page (regardless if header or footer) are only shown, if they are located within the dompdf folder.
 
They of course are located within the dompdf chroot! But this does not change anything.
 
If I place the image e.g. in dompdf/images/ the image is shown.
if I place it in e.g. ../images or /hosts/host1/images it does not work. Tryed different references to the file and double checked everything.
 
Guess this could be a little bug.
 
Images that are rendered from the html body always work.
 
In addition animated gif files, that work when placed in an <img/> tag are also not working through inline php scripting.
 
Hope this can be fixed or there is a workarround for this.
 
Thanks
 
Martin
 

BrianS

unread,
Feb 22, 2011, 2:16:53 PM2/22/11
to dompdf
Are you still having problems with this one?

When using inline script the reference should be relative to the PHP
document you are running (I believe ... or the CWD if different). Full
URLs (e.g. http://example.com...) or absolute paths (e.g. /hosts/host1/
images...) should work. I'm not sure why your absolute path wouldn't
work. Image problems have, sometimes, proven intractable.

So, do you receive any PHP errors? What happens if you enable warning
messages in dompdf_config.inc.php?

Martin Thomas Schrott

unread,
Feb 22, 2011, 2:55:21 PM2/22/11
to dom...@googlegroups.com
Hi!

I did change my pages to fixed positioning for headers and footers so I do
not have this issue anymore. But the problem still exists.

yes, I did enable warnings and even debuging. There where no problems
anounced. but images defenitely are only working within the dompdf folder
when using inline scripting.
Maybe it only happens when the script is executed through the command
line!!! I do not have a php file I just execute the dompdf.php from the
command line and have changed the first line in it as described in the
userguide.

Anyway, full paths should work and don't so there is a bug - I just can't
figure out what it is.
In the non inline scripting parts the full paths work without any problems.

using inline scripting Even the relative paths that definitely where correct
did not work. Because if I changed the relative path to point to a folder
inside the dompdf folder, the images suddenly worked.

And not even defining the chroot in dompdf did change this behaviour.

If I can help you with any further informations on that, just let me know.

cheers
Martin

--
You received this message because you are subscribed to the Google Groups
"dompdf" group.
To post to this group, send email to dom...@googlegroups.com.
To unsubscribe from this group, send email to
dompdf+un...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/dompdf?hl=en.


Reply all
Reply to author
Forward
0 new messages