Created
July 3, 2018 20:46
-
-
Save exussum12/b966eb92d06889a0fe211791d8422a2c to your computer and use it in GitHub Desktop.
FlippingBook to PDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p out | |
for i in $(seq 1 120); do | |
page=`printf "%04d" $i`; | |
wget "https://www.website/files/assets/common/page-html5-substrates/page${page}_4.jpg" | |
wget "https://www.website/files/assets/common/page-vectorlayers/${page}.svg" | |
convert -flatten -geometry 1149x2550 -fuzz 10% -transparent white -density 400 page${page}_4.jpg $page.svg out/$page.pdf | |
done; | |
cd out | |
pdfunite * out.pdf |
Its a bug with most svg renderers. wkhtmltoimage can render correctly need to convert to that
I get this error when trying to run convert command, any ideas why?
convert: non-conforming drawing primitive definition `stroke-linecap' @ error/draw.c/RenderMVGContent/4434.
Could you upload the jpg or SVG it's having trouble with. I completely forgot I made this.
That error is usually to do with one of the inputs not being in the correct format. It's possible that since I wrote the script the magazine format has changed
@exussum12 I'm discussing this issue here and there is a sample file as well: ImageMagick/ImageMagick#974 (comment)
Thanks for checking on this
Any chance to got around this?
it's font error . try install it .
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
there is a bug with the svg embedded font. not sure how to fix that