[dompdf] Background Image not working properly.

1,055 views
Skip to first unread message

Siv_naz

unread,
May 10, 2010, 10:51:49 AM5/10/10
to dompdf
Hey Guys,

I have tried dompdf in my linux-server. It's works well for background
images.

But, when I tried this same thing in my new windows server it does not
work.

Can anyone tell me what causing this issue?

Whether I need to add any extensions or library?

--
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.

BrianS

unread,
May 13, 2010, 11:19:37 PM5/13/10
to dompdf
What type of image is it? How are you referencing the image (relative
path, full URL with domain)? What method do you use to load the HTML
document? Do you receive any PHP errors?

The only thing I can think of off the top of my head is that you could
be running into a permission error. If DOMPDF has to download the
image it will attempt to write it to the location specified by
DOMPDF_TEMP_DIR. Make sure your web server has access to that
directory.

Sivalinga Raja

unread,
May 15, 2010, 10:26:05 AM5/15/10
to dom...@googlegroups.com
Thanks for reply Brain,

I am trying to use jpg image only in relative path. And I have not received any error message, I just getting pdf with text but without image.

BrianS

unread,
May 18, 2010, 9:31:34 PM5/18/10
to dompdf
How you load your HTML document also affects image loading. When
DOMPDF sees a relative path it treats it like a local filesystem path.
If your DOMPDF script isn't in the same directory as your HTML
document then the relative path won't be valid.

The exception to this is if you use the load_html_file() method with a
full URL. In that case DOMPDF sets the base_path property which
specifies the starting point for any relative paths.
> > dompdf+un...@googlegroups.com<dompdf%2Bunsu...@googlegroups.com>
> > .
> > > For more options, visit this group athttp://
> > groups.google.com/group/dompdf?hl=en.
>
> > --
> > 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<dompdf%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages