- In Miro click the + sign
- Click Upload
- Click My Device
- Select the book pages from the
B/
directory, all png images - Wait for them to load
- Ctrl+A to select them all
- Align Left
- Click the square-like four-dot in the upper-right to get the 1-column layout.
Last active
January 7, 2024 18:00
-
-
Save wsdookadr/812cb8224b59229c14fb0d3d0f6b2372 to your computer and use it in GitHub Desktop.
split PDF to images for upload to Miro
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 | |
# same without cropping or merging | |
PDF="$1" | |
rm -rf A B C | |
mkdir A B C 2>/dev/null | |
pdftk $PDF burst output A/%04d.pdf | |
find A/*.pdf | xargs -P5 -I{} bash -c ' | |
a={}; | |
b=$(echo $a | sed -e "s/pdf/png/g" | sed -e "s/^A/B/g"); | |
c=$(echo $b | sed -e "s/^B/C/") | |
convert -density 200 -flatten -trim -quality 95 $a $b; | |
' | |
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 | |
PDF="$1" | |
rm -rf A B C | |
mkdir A B C 2>/dev/null | |
pdftk $PDF burst output A/%04d.pdf | |
find A/*.pdf | xargs -P5 -I{} bash -c ' | |
a={}; | |
b=$(echo $a | sed -e "s/pdf/png/g" | sed -e "s/^A/B/g"); | |
c=$(echo $b | sed -e "s/^B/C/") | |
convert -density 200 -flatten -trim -quality 95 $a $b; | |
convert $b -crop 1042x1723+288+195 $c | |
' | |
# assemble into a big image with vertical stacked pages (top to bottom) | |
convert -density 200 -append `find C/ -name "*.png" | sort` big.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment