Gqs -o myouput.pdf-sDEVICE=pdfwrite -g8420x5950 -c "> setpagedevice" -f myleftpage.pdf -c "> setpagedevice" -f myrightpage.pdfīooklet printing is a variation on N-UP and for 16 pages "should be simple" One says how to merge 2 A5pdf in A4 Landscape. Everywhere I find only answers to "MERGE" multiple pdfĭocuments, which can be done nicely with the command pdfunite, but no I attach my bash script that does the job as mentioned. I also tried with pdftk, which I can not install on my system due to I have read all the discussions, including those on this site, but I am astonished that To do this you need 7 different commands ( pdfcrop, pdftocairo, pdfinfo, python, pdfjam, latex and dvipdfm) and you can not put the two pages side by side With only GS commands or at least with commands already installed in my operating system. I gave it a try with GhostScript, but the problem is that the pages, even if they are correctly left and right (2 x A5 -> A4 landscape), are printed on two different pages. ![]() After that, with bash scripts, I split into individual PDF pages with separate PDFs. Since the books are in html I transform them into With a bash script I order the 16 pages so that they are sequential in the dossier (front 16-1, back 2-15, front 14-3, back 4-13 etc.) My problem is printing books in sewn booklets of 4 sheets. That’s why I do not like this approach But it’s possible.I have been working on Linux Slackware for several years and So you will end up with several (nested?) lists that have to be sorted and compared. Set command to "mdls -name kMDItemKeywords -raw " & pdfpathīut the problem is the sorting, as AppleScript does not provide any convenient built-in sort functions and also does not feature key/value dictionaries like Python (or any other programming language). Set pdfpath to quoted form of "/Users/martin/Desktop/test.pdf" Moreover you can use the « mdls» command to get the keywords of a PDF document: You can also easily access the keywords of a PDF document by scripting the excellent and free PDF viewer Skim: Of course by manipulating the Python script, you can also choose to sort by the creator, title, etc.ĭo you have any suggestions that are solely native applescript without the use of any secondary scripts? It should return the paths to the chosen PDF documents sorted by the author’s name given in the metadata. Set sortedpdfpaths to paragraphs of (do shell script command) Set command to "/usr/bin/python/ " & pyscriptpath & space & stringlist Set pyscriptpath to quoted form of (POSIX path of (((path to desktop) as Unicode text) & "sortpdfs.py")) Set stringlist to stringlist & pdffilepath & space Set stringlist to stringlist & pdffilepath Set pdffilepath to quoted form of (POSIX path of (pdffile as Unicode text)) ![]() ![]() Set pdffiles to choose file with prompt "Please choose PDF files only:" with multiple selections allowed To test this script, please download the helper script to your dekstop and then execute the AppleScript code below: In case you are using an earlier incaranation of our beloved operating system, you need to install PyObjC. My solution is based on a Python helper script that requires Mac OS X 10.5 Leopard. I love everything PDF workflow and so I just couldn’t resist to write a small script for you that shows you how to do it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |