LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-15-2013, 03:18 AM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,356

Rep: Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332
PDF print of booklets


I get 4 page (and occasionally larger) pdfs with the pages numerically arranged and would like to be able to print them 2 up in the following manner.

page 1(left) opposite page 4(right)
page 2 behind page 1 and page 3 behind page 4

Any ideas? I have slackware-14.0. They are primarily text, but have some pictures.
 
Old 02-15-2013, 04:49 AM   #2
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 106Reputation: 106
Lightbulb

I am not familiar with Slackware repositories but there are programs out their that do what you want. Arch has a few.


Code:
yaourt -Ss pdf booklet
aur/booklet 1.0-1 (6)
    Converts a pdf to a booklet
aur/livret 0.2-2 (1)
    Booklet is a small freeware program written in Java for creating small 
    books from a PDF document. Drops from a source PDF file containing two 
    files the fronts and backs ready to be printed and stapled.
aur/pdf2book 1-3 (5)
    Rearranges the pages in a PDF to be printed as a book (or booklet). Print 
    double-sided in \"short-edge\" mode.
aur/print-booklet-git 20111104-2 (2)
    Print booklets from pdf and postscript files.
 
Old 02-16-2013, 03:43 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,356

Original Poster
Rep: Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332
Thanks for the reply. So it's all done separate to other programs. I thought someone was going to tell me how to tweak the print setup of something like Adobe Acrobloat or Okular.

i took a look to see what slackware had installed - it had pdfseparate and pdfunite
For a 4 page, the deal was
pdfseparate file%d = file1, file2, file3 $ file4
pdfunite 1&4 front
pdfunite 2&3 back
lp -o landscape -o number-up=2 front
lp -o landscape -o number-up=2 back
These lend themselves to a script, which it is presumed all slackware users can knock up before breakfast :-/. But pdfunite firmly refused to accept any filenames. You have given me some useful search terms, and I'll run those down. I like the sound of pdf2book - seems like there's a console jockey behind that one somewhere.
 
Old 02-16-2013, 07:16 AM   #4
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 106Reputation: 106
Plenty of ways to skin a cat. You could also place it in a function in your ~user/.bashrc file.
 
Old 02-16-2013, 08:15 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,356

Original Poster
Rep: Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332
I took a look at some of those. Webpage in arabic:-/. Then I found I didn't need to.

This makes 2 at a time.
pdf2ps file.pdf file.ps # Theoretically unnecessary as psbook handles pdf also
psbook -s4 file.ps booklet.ps
ps2pdf booklet.ps booklet.pdf # Purely to humour dodgy print utilities.
lp -o landscape -o number-up=2 booklet.ps # prints 4,1 on 1st booklet and 2,3 on second
turn pages over
lp -o landscape -o number-up=2 booklet.ps # prints 2,3 on 1st booklet and 4,1 on second

lp simply ignores it's own -P<pages> option in this setup.
 
Old 02-17-2013, 12:11 PM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,356

Original Poster
Rep: Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332
Epilogue:

Found I was getting a lot of $@#£&! from the print area due to too many suspends and resumes. A reboot sorted some messing. The pdf2ps and ps2pdf are unnecessary as psbook handles pdfs

psbook -s4 some.pdf booklet.pdf should be ok.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox print to PDF (and CUPS) only saves the first 1 or 2 pages to PDF ziphem Linux - Software 1 05-08-2011 10:43 PM
Print quality when using a2ps to print a PDF devnull10 Linux - Newbie 0 11-16-2010 12:55 PM
Print-to-file print driver to print PDF Bill Fox Linux - General 3 05-02-2006 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration