You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Has anything been done recently to make it easier to change the look for certain pages? I've seen lots of hackish solutions for doing things like having a different header/footer only on the first page, such as covering the header/footer with a white box on the first page and showing custom elements on top of this white box.
I was thinking, what if @page behaved like a normal CSS selector? For example,
Being able to target certain pages would really help when laying out multi-page PDFs, and since the current page number is already available, as well as selectors such as @page :first, it seems like it would be rather simple to include this functionality.
I'm pretty new to dompdf, so maybe there's already a way to accomplish something like this?
Thanks for the awesome library, it's really made my life easier!
The text was updated successfully, but these errors were encountered:
This is something I've considered. It doesn't strictly follow the CSS spec, but it seems like a valuable option to have and I haven't come across a better way to handle this type of styling.
bsweeney
changed the title
Different elements for different pages... why not make @page function like a CSS selector?
Allow at-page rule to be used like a CSS selector
May 22, 2023
Has anything been done recently to make it easier to change the look for certain pages? I've seen lots of hackish solutions for doing things like having a different header/footer only on the first page, such as covering the header/footer with a white box on the first page and showing custom elements on top of this white box.
I was thinking, what if
@page
behaved like a normal CSS selector? For example,Being able to target certain pages would really help when laying out multi-page PDFs, and since the current page number is already available, as well as selectors such as
@page :first
, it seems like it would be rather simple to include this functionality.I'm pretty new to dompdf, so maybe there's already a way to accomplish something like this?
Thanks for the awesome library, it's really made my life easier!
The text was updated successfully, but these errors were encountered: