aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <elena.valhalla@gmail.com>2011-04-22 09:50:33 +0200
committerElena ``of Valhalla'' Grandi <elena.valhalla@gmail.com>2011-04-22 09:50:33 +0200
commit4f5bf70319904b75f54ed9bb32aedbb5463f31ee (patch)
tree6cf883450fdbf7e67e9c749ebacdc0c3790e4aff
parentbe095d319283049a7e683d56b1e13da89d674429 (diff)
make_guides.py: generazione del PDF A6 su A4 per la stampa
-rwxr-xr-xmake_guides.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/make_guides.py b/make_guides.py
index a59138a..524d4b5 100755
--- a/make_guides.py
+++ b/make_guides.py
@@ -117,12 +117,13 @@ def build_nup_pdf(guide):
return None
except OSError:
pass
- # DEBUG
- print('Building nup PDF...')
- if not os.path.isdir(dist_dir):
- os.mkdir(dist_dir)
- fp = open(os.path.join(dist_dir,nup_name),'w')
- fp.close()
+ try:
+ os.system('pdfnup --paper a4paper --nup 2x2 --keepinfo -o '+
+ os.path.join(dist_dir,nup_name)+ ' '+
+ os.path.join(dist_dir,pdf_name)+
+ ' "16,1,14,3,2,15,4,13,12,5,10,7,11,6,8,9" ')
+ except OSError:
+ return False
def main():
parser = argparse.ArgumentParser(description='Build a distribution format of a 1800 words article',