berteh / ScribusGenerator

Create beautiful documents with data. Open source pdf (and Scribus) template and mail-merge alternative.
http://berteh.github.io/ScribusGenerator/
MIT License
250 stars 36 forks source link

How do other users print 300 PDFs from one folder please? #65

Closed MartinZaske closed 7 years ago

MartinZaske commented 8 years ago

Sorry, this is not a direct issue with the ScribusGenerator, just a question to other users on how best to send all the output to a local laser printer.

I did lots of reading online (for a Windows system) and came up with a workflow, but it is not elegant and is semi-manual:

I do dir /b *.pdf > list.txt

in my folder where all the output is, to get a list.

Then I edit the list with a little regex-magic to make a gsprint command for each file, like those for example:

"C:\Program Files\Ghostgum\gsview\gsprint.exe" -grey -landscape -from 1 -to 1 "C:\Users\name\1\newsletters\no22\1.PDF"

"C:\Program Files\Ghostgum\gsview\gsprint.exe" -grey -landscape -from 1 -to 1 "C:\Users\name\1\newsletters\no22\2.PDF"

etc.

Then I just copy and paste the entire list into a command-prompt-window and hope for no errors.

This works. You may notice that I even figured how to only print the first pages respectively out of several pages PDF. This is much faster for 300 letters on our laser printer: Only print the title page with the personal greeting and NOT print in duplex. Then turn the entire pile around and print the back-page at 30 ppm because those are all identical.

So far our own workflow on Windows 10 pro 64bit with Scribus 1.5.2 64bit. If any user has got a better or more elegant way of printing those PDFs, I would like to learn.

Seems there is now an option to create not many, but rather one massive 1200 pages PDF from ScribusGenerator, just for printing? What is the user experience, please? Is it stable enough for production (I got 16 GB ram, and some not-fancy Core i5 I believe, but not a monster machine)?

Say if I want to use the into-one-file option for a 4-page-newsletter and only want to sent the front pages to the printer first to avoid slow duplex printing. How could I do that? Is there an option in Adobe Reader to only send pages 1, 5, 9, 13, ? Or is there a trick in ScribusGenerator how to only created the PDF renderings on 300 front pages into one document, but ignoring pages 2-4? (I tried cutting my Scribus files for the printing, and it got a little better with Scribus 1.5.2. But cutting a document with chained text-boxes is not the best idea and I had issues with that approach.)

Sorry again, I know this is not an "issue", just a question. If there is a better place for this, like a forum, please move it and let me know.

Thank you for this tool, Martin

berteh commented 8 years ago

Hi Martin.

I usually resort to PDFtk to manipulate pdfs from the command-line.

From what I get you want to generate ~300 newsletters, 4 pages each, and you need to have both a) one document with each first page to print in single and b) one exemplar of pages 2-3-4 of the first newsletter, to print manually in duplex.

I would try to generate a single (merged) document (sla and pdf), to see if your machine can handle the load. I have no clue how heavy it would get, as it depends mainly on the amount & resolution of images you use and pdf export options you choose. I would preferably generate a single document, as the export to pdf is what takes time in scribus... not the generation of the sla. So having only 1 or 2 exports to pdf looks MUCH faster to me.

Therefore use ScribusGenretor just like you usually do (GUI or command-line) to generate the newsletters, but choose the "merged" option, and export to news.pdf for the following commands to work.

Then I'd split the parts I need with the command line version of pdftk (free tool for win, mac and linux - manual - examples):

pdftk A=news.pdf cat A2-4 output pages234.pdf
pdftk A=news.pdf cat Aodd output tmp.pdf
pdftk B=tmp.pdf cat Bodd output pages1.pdf
del tmp.pdf

and print pages1.pdf (either from command line or your usual pdf reader) and then print the needed copies of each page of pages234.pdf.

PDFtk can be used for much more, including rotating and resizing your pages if you ever want to print them with 2 pages per side without changing your scribus layout.

Let me know how this goes for you.

berteh commented 8 years ago

some typo in the command lines provided, now corrected.

MartinZaske commented 8 years ago

Hi Berteh,

we are working in Africa, so I keep finding more mails from you in my inbox (slow internet). Thank you for all your help and input. I have quickly looked at PDFtk and (like with the other question) will look deeper into it from next week. But did not want to respond by silence after your efforts.

Your examples mention pdftk and I find several versions online a "server" one and a "windows free" one. I suppose I will not do major server stuff, since we are all working on desktops under Windows 10 or OpenSuse, so I will probably need the Windows version.

[had guests at the door from Europe...]

Anyway, you have given me plenty of good information to work on. I will send feedback or write more questions depending on how I get on.

Thank you very much,

Martin

berteh commented 7 years ago

Hi Martin. I did update the code after spotting some errors in it.. the corrected version is online (and below) but was not sent to your mail box:

considering "news.pdf" is your complete document (merged newsletters, 4 pages each):

pdftk A=news.pdf cat A2-4 output pages234.pdf
pdftk A=news.pdf cat Aodd output tmp.pdf
pdftk B=tmp.pdf cat Bodd output pages1.pdf
del tmp.pdf
berteh commented 7 years ago

closing the issue to keep the list up-to-date. feel free to re-open if you need more help on that matter! ... and happy new year!

jvr14115 commented 6 years ago

tried pdftk. as well as pypdf. it does do the trick. only issue: the output files (single pages) are each the same size as the 50 MB pdf holding all pages. i think by now i looked everywhere but there does not seem to be a good sollution. so in the end it does not seem to be worth the workaround. i would still prefer a sollution within SG.

berteh commented 6 years ago

and when you generate individual pages from the SLA in scribus, are they much less than 50Mb? 50 is a lot! do you include high-res photos?