possible to set a margin only to the last page

90 views
Skip to first unread message

yeahman

unread,
Apr 25, 2012, 8:08:52 AM4/25/12
to dompdf
hi, is it possible to set a margintop only to the last page or (one
page before last page) of a pdf?

BrianS

unread,
May 13, 2012, 9:31:27 PM5/13/12
to dom...@googlegroups.com
On Wednesday, April 25, 2012 8:08:52 AM UTC-4, yeahman wrote:
hi, is it possible to set a margintop only to the last page or (one
page before last page) of a pdf?

The only way you could realistically do this would be to know where the last page starts. So unless you're dealing with a fairly structured document the answer is no.

John Bell

unread,
May 14, 2012, 6:27:09 AM5/14/12
to dom...@googlegroups.com
could the page_script() be used in this context? "The variables $pdf, $PAGE_NUM, and $PAGE_COUNT are available"

John

John
--
You received this message because you are subscribed to the Google Groups "dompdf" group.
To view this discussion on the web visit https://groups.google.com/d/msg/dompdf/-/MZmioN5wOBYJ.
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 15, 2012, 11:22:48 PM5/15/12
to dom...@googlegroups.com
It's late and I'm running on fumes, so I won't say it's absolutely not possible. But even if it were it would require some serious coding effort. You could maybe write some code that uses the CPDF::transform() method and push it into the stack, but you would have to be able to specify the number of the object you want to manipulate. That doesn't sound like a trivial task to me.

It does sound like an interesting coding exercise, but I don't believe I'll have time to tackle it in the near future.
Reply all
Reply to author
Forward
0 new messages