akabekobeko / examples-vivliostyle-pagedjs Goto Github PK
View Code? Open in Web Editor NEWThis is a project to compare and verify Vivliostyle and Paged.js.
License: MIT License
This is a project to compare and verify Vivliostyle and Paged.js.
License: MIT License
I unified the commands that were separated in #12, but since it is easier to test if they are separated, only the build is returned separately.
Reports from @MurakamiShinyu
{
"scripts": {
"v:css02": "vivliostyle build ./print-css-rocks/lessons/lesson-antennahouse-multicol-with-sidenotes/index.html -o pdf/vivliostyle/css02.pdf",
"v:css03": "vivliostyle build ./print-css-rocks/lessons/lesson-archive-pdf/vivliostyle/index.html -o pdf/vivliostyle/css03.pdf",
"v:css04": "vivliostyle build ./print-css-rocks/lessons/lesson-antennahouse-multicol-with-sidenotes/index.html -o pdf/vivliostyle/css04.pdf",
"v:css05": "vivliostyle build ./print-css-rocks/lessons/lesson-archive-pdf/vivliostyle/index.html -o pdf/vivliostyle/css05.pdf",
"p:css02": "pagedjs-cli ./print-css-rocks/lessons/lesson-antennahouse-multicol-with-sidenotes/index.html -o pdf/pagedjs/css02.pdf",
"p:css03": "pagedjs-cli ./print-css-rocks/lessons/lesson-archive-pdf/pagedjs/index.html -o pdf/pagedjs/css03.pdf",
"p:css04": "pagedjs-cli ./print-css-rocks/lessons/lesson-antennahouse-multicol-with-sidenotes/index.html -o pdf/pagedjs/css04.pdf",
"p:css05": "pagedjs-cli ./print-css-rocks/lessons/lesson-archive-pdf/pagedjs/index.html -o pdf/pagedjs/css05.pdf"
}
Report from @MurakamiShinyu
それからREADMEのBuildの前に npm install が必要だと思います。
This project uses npm, so you need npm install for Setup.
The following sample does not finish building.
> [email protected] p:viv05 .../examples-vivliostyle-pagedjs
> pagedjs-cli ./vivliostyle/samples/gutenberg/Sherlock.html -o pdf/pagedjs/viv05.pdf
✔ Loaded
◶ Rendering: Page 5
> [email protected] p:css24 .../examples-vivliostyle-pagedjs
> pagedjs-cli ./print-css-rocks/lessons/lesson-footnotes/index.html -o pdf/pagedjs/css24.pdf
◷ Loading: ./print-css-rocks/lessons/lesson-footnotes/index.html
> [email protected] p:css32 .../examples-vivliostyle-pagedjs
> pagedjs-cli ./print-css-rocks/lessons/lesson-mathml-native/index.html -o pdf/pagedjs/css32.pdf
◵ Loading: ./print-css-rocks/lessons/lesson-mathml-native/index.html
vivliostyle-cli
> [email protected] v:css56 .../examples-vivliostyle-pagedjs
> vivliostyle build ./print-css-rocks/lessons/lesson-two-column-with-author-box/index.xml -o pdf/css56.pdf
===> Launching build environment...
===> Building pages...
Error: waiting for function failed: timeout 30000ms exceeded
If you think this is a bug, please report at https://github.com/vivliostyle/vivliostyle-cli/issues
pagedjs-cli
> [email protected] p:css56 .../examples-vivliostyle-pagedjs
> pagedjs-cli ./print-css-rocks/lessons/lesson-two-column-with-author-box/index.xml -o pdf/css56.pdf
Must pass a html or xhtml file as input
Corrected the serial number of the command name in # 10, but the PDF file name in the command remains the same, so correct it.
Remove some Vivliostyle samples that are not needed for your own extensions or comparisons. Also, remove the preview command because build (PDF) is sufficient for comparison.
contents/
... Sample for CSS Paged Media HTML/CSSpackage.json
... Settings of Node.js projectThe CSS of print-css.rocks refers to the files in the upper layer as follows.
@import url("../styles/a4.css");
However, vivliostyle-cli specifies a sample directory, so the upper layers are ignored. Need to specify the directory with -r
to refer to the upper layer.
Vivliostyle and Paged.js do not support XML, so exclude them from the sample.
Vivliostyle is pdf/vivliostyle/
, Paged.js is pdf/pagedjs/
Delete only the files related to each individually.
Implement the preview/build command with vivliostyle-cli and pagedjs-cli as npm-scripts.
Should be viv *
instead of css *
.
HTML is specified for the XML file.
{
"scripts": {
"v:css56": "vivliostyle build ./print-css-rocks/lessons/lesson-two-column-with-author-box/index.html -o pdf/css56.pdf",
"p:css56": "pagedjs-cli ./print-css-rocks/lessons/lesson-two-column-with-author-box/index.html -o pdf/css56.pdf",
}
}
The correct name is *.xml
.
{
"scripts": {
"v:css56": "vivliostyle build ./print-css-rocks/lessons/lesson-two-column-with-author-box/index.xml -o pdf/css56.pdf",
"p:css56": "pagedjs-cli ./print-css-rocks/lessons/lesson-two-column-with-author-box/index.xml -o pdf/css56.pdf",
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.