Giving a background image for a Table.

64 views
Skip to first unread message

Arun Shanker Prasad

unread,
Apr 16, 2009, 9:34:01 AM4/16/09
to Pisa XHTML2PDF Support
Hi All,

My question is can we give background-image to a "TABLE" or "DIV" like
we give in HTML?

My requirement is that I have a header and a footer for my PDF, I need
to give the header and the footer two different background images.

I am hosting my application in Google's App Engine, if that makes any
difference..

Thanks,
Arun Shanker Prasad.

Arun Shanker Prasad

unread,
Apr 16, 2009, 9:36:55 AM4/16/09
to Pisa XHTML2PDF Support
Hi,

I accomplished to add the header a background image by giving the,

@page {
size: a4;
margin: 1cm;
background-image: url('images/bg_image.jpg');
}

How can I give the footer?

Any suggestion to get the Table Background-Image will be greatly
appreciated, as that will give me more control over where the
background image is placed than giving the background-image for the
whole PDF.

Thanks,
Arun Shanker Prasad.

On Apr 16, 6:34 pm, Arun Shanker Prasad <ArunShankerPra...@gmail.com>
wrote:

Arun Shanker Prasad

unread,
Apr 16, 2009, 3:18:33 PM4/16/09
to Pisa XHTML2PDF Support
Hi,

Any suggestions guys?? I would really appreciate any help.

Thanks,
Arun Shanker Prasad.

On Apr 16, 6:36 pm, Arun Shanker Prasad <ArunShankerPra...@gmail.com>

hasain sab

unread,
Apr 17, 2009, 2:20:30 AM4/17/09
to xhtm...@googlegroups.com
hi,
     as i have experienced you should be able to display images if you provide the complete url of the image..
regards
hasain
--
Best Regars ,
Hasain Sab.

Arun Shanker Prasad

unread,
Apr 17, 2009, 2:24:29 AM4/17/09
to Pisa XHTML2PDF Support
Hi,

Thank you hasain, for the reply, I gave the complete URL of the image
and was able to get the background-image for the page.

Could you please give me an example of how I can give the background-
image for a TABLE or a DIV?

Thanks,
Arun Shanker Prasad.

Dirk Holtwick

unread,
May 4, 2009, 5:23:54 AM5/4/09
to xhtm...@googlegroups.com
Hi,

it is not possible to set a background image for TABLE or DIV. The usual
approach is to set a PDF or JPG in the background as described by Hasain.

Dirk

Arun Shanker Prasad schrieb:

Arun Shanker Prasad

unread,
May 4, 2009, 5:26:18 AM5/4/09
to xhtm...@googlegroups.com
Thank you Dirk for the reply. I was afraid that was the only solution..

Thanks,
Arun Shanker Prasad.
Reply all
Reply to author
Forward
0 new messages