Skip to content

Lay out images (cards, tokens etc) on a paper sheet

Notifications You must be signed in to change notification settings

SirYaro/arrange_cards

Repository files navigation

Lay out images


This script lays out specified images on paper sheet

--
Set it up
sudo apt -y install imagemagick git

Change ImageMagic permissions

sudo apt -y install xmlstarlet
cd /etc/ImageMagick-6  #check if that is correct directory
sudo xmlstarlet edit -L --update "/policymap/policy[@name='disk']/@value" --value "16GiB" policy.xml  #allows to handle files up to 16GB
sudo xmlstarlet edit -L --subnode "/policymap" --type elem --name 'policy domain="coder" rights="read|write" pattern="PDF" ' policy.xml #allows read/write pdfs

if you still getting an error:
convert-im6.q16: not authorized 'filename.pdf' @ error/constitute.c/WriteImage/1037.
you can try disable IM limits all together with
sudo mv /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xml.BAK

Instalation

git clone [email protected]:SirYaro/arrange_cards.git
cd arrange_cards

Testing
Try to run sample_generate.sh in one of sample_envX directories:

ex:

cd sample_env
cat sample_generate.sh # to check what you're about to run
./sample_generate.sh

and then look for filename.pdf.
For much more advanced example please check sample_env3

cd sample_env3
cat sample_generate.sh
./sample_generate.sh

Note
ImageMagick version: 6.7.7-10 2014-03-06 Q16 have/had some bug in flop function which caused unwanted images color changes. ImageMagick version 6.8.9-9 Q16 x86_64 seems to work fine.

About

Lay out images (cards, tokens etc) on a paper sheet

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages