Top and Bottom page margins

3,137 views
Skip to first unread message

kketzal

unread,
May 20, 2009, 6:57:17 AM5/20/09
to dompdf
Hi:

Do you know if I can minimize or reduce top and/or bottom page
margins in PDF generated by dompdf?? I have a page in A4 format
without header and footer...it's a invoice with an image logo on the
top of the page, but the logo is displayed with a lot of top margin (i
think)....i would like to put it more near of the top...if this
possible?'?

Thanks in advance.

Luca Priorelli

unread,
May 20, 2009, 7:10:12 AM5/20/09
to dom...@googlegroups.com
Yes, using CSS. Try something like

@page { margin: 0.2in 0.5in 0.2in 0.5in;}

Luca

Helmut Tischer

unread,
May 20, 2009, 8:01:57 AM5/20/09
to dom...@googlegroups.com
> Do you know if I can minimize or reduce top and/or bottom page
> margins in PDF generated by dompdf?? I have a page in A4 format

In a css script for media=all or media=print, assign a css margin or
padding to the <body> or outmost <div> container.

Reply all
Reply to author
Forward
0 new messages