Print two files in duplex ( one file in each side)
![](https://seccdn.libravatar.org/avatar/a807612380c46e29332e227b404ac204.jpg?s=120&d=mm&r=g)
Hi everyone: I want print in command line (i will use a script) two PDF files one in each side of the screen. Of course each PDF has single page. If i use this command the printer print two different sheets. lp -d DCPL2530DW -o sides=two-sided-long-edge hoja1.pdf hoja2.pdf How i can do? Happy New year Best Regards -- Be Free, Be Linux
![](https://seccdn.libravatar.org/avatar/77cb4da5f72bc176182dcc33f03a18f3.jpg?s=120&d=mm&r=g)
On 2024-01-09 22:55, Christian Schmitz wrote:
Hi everyone: I want print in command line (i will use a script) two PDF files one in each side of the screen. Of course each PDF has single page. If i use this command the printer print two different sheets. lp -d DCPL2530DW -o sides=two-sided-long-edge hoja1.pdf hoja2.pdf
How i can do? Happy New year
You mean print in the same piece of paper, the page 1 of PDF_1 and page 1 of PDF_2, side by side? I don't know how to do that, except by combining them in a graphical editor, by hand. I could produce a photo of both pages to the max resolution of the printer, and use perhaps convert to join both photos into one, then print that joined photo. It could be repeated for the entire document. Then, in you can code in postscript, perhaps you can do the same in postscript. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
![](https://seccdn.libravatar.org/avatar/6efcef3d9748aadcb5e18e655e007079.jpg?s=120&d=mm&r=g)
On Tue, 9 Jan 2024 23:14:36 +0100, "Carlos E. R."
On 2024-01-09 22:55, Christian Schmitz wrote:
Hi everyone: I want print in command line (i will use a script) two PDF files one in each side of the screen. Of course each PDF has single page. If i use this command the printer print two different sheets. lp -d DCPL2530DW -o sides=two-sided-long-edge hoja1.pdf hoja2.pdf
How i can do? Happy New year
You mean print in the same piece of paper, the page 1 of PDF_1 and page 1 of PDF_2, side by side?
'pdfunite' from the poppler-tools package can combine two PDFs into one. pdfunite page_A.pdf page_B.pdf out-two_pages.pdf Use '/dev/stdout' as the output filename to pipe to the print command. -- Robert Webb
![](https://seccdn.libravatar.org/avatar/49cb915af8be4fe9eab238c594dee035.jpg?s=120&d=mm&r=g)
Am 10.01.24 um 00:29 schrieb Robert Webb:
On Tue, 9 Jan 2024 23:14:36 +0100, "Carlos E. R."
wrote: On 2024-01-09 22:55, Christian Schmitz wrote:
Hi everyone: I want print in command line (i will use a script) two PDF files one in each side of the screen. Of course each PDF has single page. If i use this command the printer print two different sheets. lp -d DCPL2530DW -o sides=two-sided-long-edge hoja1.pdf hoja2.pdf
How i can do? Happy New year
You mean print in the same piece of paper, the page 1 of PDF_1 and page 1 of PDF_2, side by side?
'pdfunite' from the poppler-tools package can combine two PDFs into one.
pdfunite page_A.pdf page_B.pdf out-two_pages.pdf
Use '/dev/stdout' as the output filename to pipe to the print command. -- Robert Webb
pdftk will do also combine 2 pdf pages: pdftk first.pdf second.pdf cat output cobined.pdf simoN -- www.becherer.de
![](https://seccdn.libravatar.org/avatar/433921d165f58380f515550f741b0fff.jpg?s=120&d=mm&r=g)
Am 10.01.24 um 08:37 schrieb Simon Becherer:
Am 10.01.24 um 00:29 schrieb Robert Webb:
On Tue, 9 Jan 2024 23:14:36 +0100, "Carlos E. R."
wrote: On 2024-01-09 22:55, Christian Schmitz wrote:
Hi everyone: I want print in command line (i will use a script) two PDF files one in each side of the screen. Of course each PDF has single page. If i use this command the printer print two different sheets. lp -d DCPL2530DW -o sides=two-sided-long-edge hoja1.pdf hoja2.pdf
How i can do? Happy New year
You mean print in the same piece of paper, the page 1 of PDF_1 and page 1 of PDF_2, side by side?
'pdfunite' from the poppler-tools package can combine two PDFs into one.
pdfunite page_A.pdf page_B.pdf out-two_pages.pdf
Use '/dev/stdout' as the output filename to pipe to the print command. -- Robert Webb
pdftk will do also combine 2 pdf pages:
pdftk first.pdf second.pdf cat output cobined.pdf
pdfarranger is my preferred tool for such things. Cheers, Manfred
simoN
![](https://seccdn.libravatar.org/avatar/c8b49a7a57ae09cd5482d4a4ac5bb593.jpg?s=120&d=mm&r=g)
I like qpdf and everything at once $ qpdf --empty --pages hoja1.pdf hoja2.pdf -- - | lp -dDCPL2530DW -o sides=two-sided-long-edge -- /bengan
![](https://seccdn.libravatar.org/avatar/a807612380c46e29332e227b404ac204.jpg?s=120&d=mm&r=g)
On Wednesday 10 January 2024 15:37:16 Bengt Gördén wrote:
I like qpdf and everything at once
$ qpdf --empty --pages hoja1.pdf hoja2.pdf -- - | lp -dDCPL2530DW -o sides=two-sided-long-edge Finally i use pdftk because i already have installed. Because is a printing script that print allways the same (a user manual) i dont use the pipe, i create a file "duplex1.pdf"
Thanks to all for the answer. Christian -- Be Free, Be Linux
participants (6)
-
Bengt Gördén
-
Carlos E. R.
-
Christian Schmitz
-
Manfred Schwarb
-
Robert Webb
-
Simon Becherer