Commit f9473a59 authored by Fred Chasen's avatar Fred Chasen

Update to pagedjs@0.1.5

parent c107e70d
...@@ -123,7 +123,7 @@ if (program.hyphenate) { ...@@ -123,7 +123,7 @@ if (program.hyphenate) {
console.log(msg, width, height, orientation); console.log(msg, width, height, orientation);
if (headless) { if (headless) {
let pages = await page.waitForSelector(".pages"); let pages = await page.waitForSelector(".pagedjs_pages");
let pdf = await page.pdf({ let pdf = await page.pdf({
path: output, path: output,
printBackground: true, printBackground: true,
...@@ -136,8 +136,7 @@ if (program.hyphenate) { ...@@ -136,8 +136,7 @@ if (program.hyphenate) {
right: 0, right: 0,
bottom: 0, bottom: 0,
left: 0, left: 0,
}, }
// format: 'A4'
}).catch((e) => { }).catch((e) => {
console.error(e); console.error(e);
}); });
......
This diff is collapsed.
{ {
"name": "pagedjs-cli", "name": "pagedjs-cli",
"version": "0.0.1", "version": "0.0.2",
"author": "Fred Chasen", "author": "Fred Chasen",
"license": "MIT", "license": "MIT",
"homepage": "https://pagedmedia.org", "homepage": "https://pagedmedia.org",
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
"dependencies": { "dependencies": {
"commander": "^2.15.1", "commander": "^2.15.1",
"express": "^4.16.3", "express": "^4.16.3",
"pagedjs": "0.0.3", "pagedjs": "0.1.5",
"puppeteer": "^1.2.0", "puppeteer": "^1.5.0",
"replace-ext": "^1.0.0" "replace-ext": "^1.0.0"
} }
} }
# Aurorae
Test of different generating PDF tools using HTML and CSS.
* PDF reactor : [http://www.pdfreactor.com/](http://www.pdfreactor.com/)
* Prince XML : [https://www.princexml.com/](https://www.princexml.com/)
## Book
The book "Auroræ : their characters and spectra" by J. Rand Capron is used for comparaison.
The original (x)HTML file is part of the[Gutenberg project](http://www.gutenberg.org/), it has been transformed for the needs.
[I'm an inline-style link](http://www.gutenberg.org/ebooks/56159?msg=welcome_stranger)
Licence : Project Gutenberg License
Title: Auroræ: Their Characters and Spectra
Release Date: December 10, 2017 [EBook #56159]
Language: English
Character set encoding: UTF-8
## Files
`index.html` : the Auroræ book
Before using, you must change the path of the CSS and javascript files according to the tool tested.
`book.css` : commun CSS for all tools (styling + footnotes + page breaks)
`fonts` and `images` folders contain the resources used in all tools
Each tools have a specific file with :
* `layout-*.html` : CSS contain features for layout
* `script.html` : most tools accept javascript with proprietary access to layout information
* `aurorae-*.pdf` : the PDF generated
## TODO
* add other test-tools
* Vivliostyle
* Antennahouse
* add table comparaison
* add images, plates and figures + list of figures
* add index
* add cross references
* Styling tables
* all table in chapters
* add border-bottom when table is break
* #table-appa-01 > 2 column
* add mathematical support + Styling
* balancing text in titles
* clean HTML
* add span Greek
* transform sidenotes into span
* remove all !important in CSS
...@@ -10,11 +10,11 @@ html{ ...@@ -10,11 +10,11 @@ html{
} }
@page { @page {
size: 148mm 210mm portait; size: 148mm 210mm portait
} }
@media screen { @media screen {
.page { .baseline .pagedjs_page {
background-image: repeating-linear-gradient(180deg, transparent 0, transparent 14px , rgba(0,255,0,0.7) var(--baseline)) ; background-image: repeating-linear-gradient(180deg, transparent 0, transparent 14px , rgba(0,255,0,0.7) var(--baseline)) ;
background-size: cover; background-size: cover;
background-position: 0 -3px , 0 0 background-position: 0 -3px , 0 0
...@@ -158,20 +158,6 @@ section[data-type="epigraph"], ...@@ -158,20 +158,6 @@ section[data-type="epigraph"],
font-variant-numeric: oldstyle-nums; font-variant-numeric: oldstyle-nums;
} }
.shorter:nth(1) {
position: running(shorter1);
}
.shorter:nth(2) {
position: running(shorter2);
}
.page:nth(1) {
content: --var-1;
}
--var-1 = dataurl:svg
/* flexbox */ /* flexbox */
section[data-type="copyright"] #flexbox { section[data-type="copyright"] #flexbox {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment