CSS Paged Media Module Level 3

1,549 views
Skip to first unread message

Surfoo

unread,
Jun 28, 2017, 3:40:11 AM6/28/17
to Chromium-discuss
Hello,

I just discovered the headless mode in Chrome, and I'm very interested because i'd like to replace phantomjs with this headless mode.
But I'm looking for some information about the full (or not) support of "CSS Paged Media Module Level 3" (https://www.w3.org/TR/css3-page/).

Do you know what is supported by Chrome/Chromium? For exemple, I can't custom the header/footer or use counter(page).
And what about of the full implementation of this module in the future?

Thank you,
Surfoo

PhistucK

unread,
Jun 28, 2017, 3:44:14 AM6/28/17
to sur...@gmail.com, Chromium-discuss
According to caniuse.com/paged, it is supported. Do you expect it to work on the (headless) screen, or on a printed (PDF or actual) page?


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Surfoo

unread,
Jun 28, 2017, 4:46:14 PM6/28/17
to Chromium-discuss, sur...@gmail.com
Hello,

I expect it to work on the headless screen to create a PDF file.

I tested only few css rules, but you can test with this example : https://pastebin.com/ygAjsN1L
and my command : google-chrome-stable --headless --disable-gpu --print-to-pdf http://localhost/test.html

margin and break-before seems to be ok, but :
size: A5 -> don't work, It's a A4 PDF with the content in a A5 box...
@top-center: content -> don't work. The header of each page are empty.
@bottom-center: counter -> don't work too.


Surfoo



PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

PhistucK

unread,
Jun 28, 2017, 4:55:37 PM6/28/17
to Baptiste T., Chromium-discuss
Is everything you need working in non-headless Chrome?


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Surfoo

unread,
Jun 28, 2017, 5:07:06 PM6/28/17
to Chromium-discuss, sur...@gmail.com
Yes, it would be a good starting point!


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Eric Seckler

unread,
Jun 29, 2017, 2:47:27 AM6/29/17
to sur...@gmail.com, Chromium-discuss
Page margin boxes aren't yet supported in chrome (neither headless nor desktop), see https://crbug.com/320370. Feel free to star the issue to voice your interest :)

Regarding the paper size, you can specify that in the DevTools command that --print-to-pdf relies on. By default, it uses letter size. You'll need to implement your own devtools client for this, see the headless readme or blog post for pointers.

Hai-Nam Nguyen

unread,
Jul 18, 2017, 6:32:10 AM7/18/17
to Chromium-discuss, sur...@gmail.com

Le mercredi 28 juin 2017 09:44:14 UTC+2, PhistucK a écrit :
According to caniuse.com/paged, it is supported. Do you expect it to work on the (headless) screen, or on a printed (PDF or actual) page?
 

I think caniuse means the CSS Level 2 paged media support (https://www.w3.org/TR/CSS2/page.html), not the Level 3 as in https://www.w3.org/TR/css3-page/ or https://drafts.csswg.org/css-page-3/
Reply all
Reply to author
Forward
0 new messages