Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support printing mixed page sizes #751

Closed
MurakamiShinyu opened this issue Jul 26, 2021 · 1 comment · Fixed by #912
Closed

Support printing mixed page sizes #751

MurakamiShinyu opened this issue Jul 26, 2021 · 1 comment · Fixed by #912
Assignees

Comments

@MurakamiShinyu
Copy link
Member

Example: https://github.com/zopyx/print-css-rocks/tree/master/lessons/lesson-named-pages

Test with Vivliostyle Viewer: https://vivliostyle.vercel.app/#src=https://github.com/zopyx/print-css-rocks/blob/master/lessons/lesson-named-pages/index.html

This test document has different page sizes, A5 portrait, A5 landscape, and A6 landscape.
Viewing it with the viewer is ok, but when printing all pages are printed with the first specified page size, in this case, A5 portrait.

Screen Shot 2021-07-26 at 14 52 44

@MurakamiShinyu MurakamiShinyu self-assigned this Apr 29, 2022
MurakamiShinyu added a commit that referenced this issue May 2, 2022
- resolves #751

This change enables mixed page sizes in output PDF together with the following change in vivliostyle-cli:

- vivliostyle/vivliostyle-cli#278

When multiple page sizes are specified, as in the example in Issue 751,
the largest page size both vertically and horizontally are used in PDF output
from Vivliostyle.js.
Then the PDF is post-processed in the Vivliostyle CLI to set the multiple page sizes as specified.
@MurakamiShinyu
Copy link
Member Author

MurakamiShinyu commented May 3, 2022

Implemented in #912 together with vivliostyle/vivliostyle-cli#278

Test, using the vivliostyle.js and vivliostyle-cli of these pull requests:

$ vivliostyle build -o output.pdf https://github.com/zopyx/print-css-rocks/blob/master/lessons/lesson-named-pages/index.html
⊙ Building PDF
output.pdf has been created.
🎉 Built successfully.

$ vivliostyle build -o output-cropmarks.pdf --style 'data:,@page{marks:crop%20cross;bleed:3mm}' https://github.com/zopyx/print-css-rocks/blob/master/lessons/lesson-named-pages/index.html
⊙ Building pages
output-cropmarks.pdf has been created.
🎉 Built successfully.

Output PDFs (without and with crop marks):

Screenshot viewing these PDFs in Acrobat Pro:

Screen Shot 2022-05-03 at 18 52 35

MurakamiShinyu added a commit that referenced this issue May 4, 2022
- resolves #751

This change enables mixed page sizes in output PDF together with the following change in vivliostyle-cli:

- vivliostyle/vivliostyle-cli#278

When multiple page sizes are specified, as in the example in Issue 751,
the largest page size both vertically and horizontally are used in PDF output
from Vivliostyle.js.
Then the PDF is post-processed in the Vivliostyle CLI to set the multiple page sizes as specified.
MurakamiShinyu added a commit that referenced this issue May 4, 2022
- resolves #751

This change enables mixed page sizes in output PDF together with the following change in vivliostyle-cli:

- vivliostyle/vivliostyle-cli#278

When multiple page sizes are specified, as in the example in Issue 751,
the largest page size both vertically and horizontally are used in PDF output
from Vivliostyle.js.
Then the PDF is post-processed in the Vivliostyle CLI to set the multiple page sizes as specified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant