Re: Print several (small) pages on A4/Letter sheet
On Sun 19 Jan 2020 at 08:29:46 -0700, Charles Curley wrote: > On Sat, 18 Jan 2020 15:42:08 +0100 > Rainer Dorsch wrote: > > > I have a pdf file with a page size of 186x65 mm2. If I print that on > > A4, I get printouts which are mainly white, except the 186x65 mm2. > > > > Is there a good way to get it printed in a compact way (e.g. 4 pages > > on top of each other on an A4 sheet)? I could not find an option in > > pdftk, so any advice or hint is welcome... > > That is called printing N-up, in your case 4-up. Assuming you have CUPS > installed, look at the number_up option, > http://localhost:631/help/options.html#NUMBERUP A decent idea, but Rainer Dorsch is happy with --nup '1x4'. CUPS will not produce such a layout. -- Brian.
Re: Print several (small) pages on A4/Letter sheet
On Sat, 18 Jan 2020 15:42:08 +0100 Rainer Dorsch wrote: > I have a pdf file with a page size of 186x65 mm2. If I print that on > A4, I get printouts which are mainly white, except the 186x65 mm2. > > Is there a good way to get it printed in a compact way (e.g. 4 pages > on top of each other on an A4 sheet)? I could not find an option in > pdftk, so any advice or hint is welcome... That is called printing N-up, in your case 4-up. Assuming you have CUPS installed, look at the number_up option, http://localhost:631/help/options.html#NUMBERUP -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/
Re: Print several (small) pages on A4/Letter sheet
On Sat 18 Jan 2020 at 20:50:05 +, Curt wrote: > On 2020-01-18, Brian wrote: > > On Sat 18 Jan 2020 at 15:42:08 +0100, Rainer Dorsch wrote: > > > >> I have a pdf file with a page size of 186x65 mm2. If I print that on A4, I > >> get > >> printouts which are mainly white, except the 186x65 mm2. > >> > >> Is there a good way to get it printed in a compact way (e.g. 4 pages on > >> top of > >> each other on an A4 sheet)? I could not find an option in pdftk, so any > >> advice > >> or hint is welcome... > > > > Using something that is probably on your system and doesn't pull in > > all the enormous texlive baggage: > > > > pdfunite your.pdf your.pdf your.pdf your.pdf out.pdf > > This would put all yours on the same page (we are on the same page > here)? Unfortunately not. My testing was inadequate. -- Brian.
Re: Print several (small) pages on A4/Letter sheet
On 2020-01-18, Brian wrote: > On Sat 18 Jan 2020 at 15:42:08 +0100, Rainer Dorsch wrote: > >> I have a pdf file with a page size of 186x65 mm2. If I print that on A4, I >> get >> printouts which are mainly white, except the 186x65 mm2. >> >> Is there a good way to get it printed in a compact way (e.g. 4 pages on top >> of >> each other on an A4 sheet)? I could not find an option in pdftk, so any >> advice >> or hint is welcome... > > Using something that is probably on your system and doesn't pull in > all the enormous texlive baggage: > > pdfunite your.pdf your.pdf your.pdf your.pdf out.pdf This would put all yours on the same page (we are on the same page here)? -- "J'ai pour me guérir du jugement des autres toute la distance qui me sépare de moi." Antonin Artaud
Re: Print several (small) pages on A4/Letter sheet
On Sat 18 Jan 2020 at 15:42:08 +0100, Rainer Dorsch wrote: > I have a pdf file with a page size of 186x65 mm2. If I print that on A4, I > get > printouts which are mainly white, except the 186x65 mm2. > > > > Is there a good way to get it printed in a compact way (e.g. 4 pages on top > of > each other on an A4 sheet)? I could not find an option in pdftk, so any > advice > or hint is welcome... > Using something that is probably on your system and doesn't pull in all the enormous texlive baggage: pdfunite your.pdf your.pdf your.pdf your.pdf out.pdf __ Brian. >
Re: Print several (small) pages on A4/Letter sheet
On Sat 18 Jan 2020 at 15:42:08 +0100, Rainer Dorsch wrote: > I have a pdf file with a page size of 186x65 mm2. If I print that on A4, I > get > printouts which are mainly white, except the 186x65 mm2. > > Is there a good way to get it printed in a compact way (e.g. 4 pages on top > of > each other on an A4 sheet)? I could not find an option in pdftk, so any > advice > or hint is welcome... Using something that is probably on your system and doesn't pull in all the enormous texlive baggage: pdfunite your.pdf your.pdf your.pdf your.pdf out.pdf -- Brian.
Re: Print several (small) pages on A4/Letter sheet
On 2020-01-18, Rainer Dorsch wrote: > Hi, > > I have a pdf file with a page size of 186x65 mm2. If I print that on A4, I > get > printouts which are mainly white, except the 186x65 mm2. > Is there a good way to get it printed in a compact way (e.g. 4 pages on top > of > each other on an A4 sheet)? I could not find an option in pdftk, so any > advice > or hint is welcome... evince has a 'Pages per side' setting in the print dialogue which allows for such a thing (the easy way out). > Thanks > Rainer -- "J'ai pour me guérir du jugement des autres toute la distance qui me sépare de moi." Antonin Artaud
Re: Print several (small) pages on A4/Letter sheet
Am Samstag, 18. Januar 2020, 16:14:45 CET schrieb David Wright: > On Sat 18 Jan 2020 at 15:42:08 (+0100), Rainer Dorsch wrote: > > Hi, > > > > I have a pdf file with a page size of 186x65 mm2. If I print that on A4, I > > get printouts which are mainly white, except the 186x65 mm2. > > > > Is there a good way to get it printed in a compact way (e.g. 4 pages on > > top of each other on an A4 sheet)? I could not find an option in pdftk, > > so any advice or hint is welcome... > > I use pdfjam in texlive-extra-utils in functions like these. > > function a4-2up-a4r { > [ -z "$1" ] && printf '%s\n' "Usage: $FUNCNAME prints a single A4 > page > as 2-up A5 pages on an A4 landscape page for producing A5 hand bills when > cut up." >&2 && return 1 local Expandedname="$(-addextensionandoldfile "$1" > "pdf")" > [ -z "$Expandedname" ] && return > pdfjam --vanilla --nup '2x1' --landscape --a4paper --outfile > "${Expandedname/%.pdf/-a4-2up-a4r.pdf}" "$Expandedname" "$Expandedname" } > > function a4-4up-a4 { > [ -z "$1" ] && printf '%s\n' "Usage: $FUNCNAME prints a single A4 > page > as 4-up A6 pages on an A4 page for producing A6 hand bills when cut up." > >&2 && return 1 local Expandedname="$(-addextensionandoldfile "$1" "pdf")" > [ -z "$Expandedname" ] && return > pdfjam --vanilla --nup '2x2' --no-landscape --a4paper --outfile > "${Expandedname/%.pdf/-a4-4up-a4.pdf}" "$Expandedname" "$Expandedname" > "$Expandedname" "$Expandedname" } > > function a4-8up-a4r { > [ -z "$1" ] && printf '%s\n' "Usage: $FUNCNAME prints a single A4 > page > as 8-up A7 pages on an A4 page for producing A7 tickets when cut up." >&2 > && return 1 > local Expandedname="$(-addextensionandoldfile "$1" "pdf")" > [ -z "$Expandedname" ] && return > pdfjam --vanilla --nup '4x2' --landscape --a4paper --outfile > "${Expandedname/%.pdf/-a4-8up-a4r.pdf}" "$Expandedname" "$Expandedname" > "$Expandedname" "$Expandedname" "$Expandedname" "$Expandedname" > "$Expandedname" "$Expandedname" } > > -addextensionandoldfile just adds .pdf if absent, and checks the file > exists. Then the output file has explanatory info added to its name. > > The pages are prepared for purpose at the appropriate size. You can > use --scale n and --noautoscale true if needed for your input. > Many thanks, David. pdfjam --vanilla --nup '1x4' --no-landscape --a4paper --outfile out.pdf in.pdf does exactly what I want (perfectly scaled to A4). Thanks again Rainer > Cheers, > David. -- Rainer Dorsch http://bokomoko.de/
Re: Print several (small) pages on A4/Letter sheet
On Sat 18 Jan 2020 at 15:42:08 (+0100), Rainer Dorsch wrote: > Hi, > > I have a pdf file with a page size of 186x65 mm2. If I print that on A4, I > get > printouts which are mainly white, except the 186x65 mm2. > > Is there a good way to get it printed in a compact way (e.g. 4 pages on top > of > each other on an A4 sheet)? I could not find an option in pdftk, so any > advice > or hint is welcome... I use pdfjam in texlive-extra-utils in functions like these. function a4-2up-a4r { [ -z "$1" ] && printf '%s\n' "Usage:$FUNCNAME prints a single A4 page as 2-up A5 pages on an A4 landscape page for producing A5 hand bills when cut up." >&2 && return 1 local Expandedname="$(-addextensionandoldfile "$1" "pdf")" [ -z "$Expandedname" ] && return pdfjam --vanilla --nup '2x1' --landscape --a4paper --outfile "${Expandedname/%.pdf/-a4-2up-a4r.pdf}" "$Expandedname" "$Expandedname" } function a4-4up-a4 { [ -z "$1" ] && printf '%s\n' "Usage:$FUNCNAME prints a single A4 page as 4-up A6 pages on an A4 page for producing A6 hand bills when cut up." >&2 && return 1 local Expandedname="$(-addextensionandoldfile "$1" "pdf")" [ -z "$Expandedname" ] && return pdfjam --vanilla --nup '2x2' --no-landscape --a4paper --outfile "${Expandedname/%.pdf/-a4-4up-a4.pdf}" "$Expandedname" "$Expandedname" "$Expandedname" "$Expandedname" } function a4-8up-a4r { [ -z "$1" ] && printf '%s\n' "Usage:$FUNCNAME prints a single A4 page as 8-up A7 pages on an A4 page for producing A7 tickets when cut up." >&2 && return 1 local Expandedname="$(-addextensionandoldfile "$1" "pdf")" [ -z "$Expandedname" ] && return pdfjam --vanilla --nup '4x2' --landscape --a4paper --outfile "${Expandedname/%.pdf/-a4-8up-a4r.pdf}" "$Expandedname" "$Expandedname" "$Expandedname" "$Expandedname" "$Expandedname" "$Expandedname" "$Expandedname" "$Expandedname" } -addextensionandoldfile just adds .pdf if absent, and checks the file exists. Then the output file has explanatory info added to its name. The pages are prepared for purpose at the appropriate size. You can use --scale n and --noautoscale true if needed for your input. Cheers, David.
Re: Print several (small) pages on A4/Letter sheet
On Sat, 18 Jan 2020 15:42:08 +0100 Rainer Dorsch wrote: Hello Rainer, >Is there a good way to get it printed in a compact way (e.g. 4 pages on >top of each other on an A4 sheet)? I could not find an option in pdftk, LibreOffice can read pdfs. LibreOffice can also print multiple sheets per page. However, LO's rendering of PDFs isn't the best. If you have it, acroread can handle the task with ease. -- Regards _ / ) "The blindingly obvious is / _)radnever immediately apparent" It's only bits of plastic, lines projected on the wall Keep It Clean - The Vibrators pgpxopkBw6QIT.pgp Description: OpenPGP digital signature
Re: Print several (small) pages on A4/Letter sheet
Rainer Dorsch writes: Hi, I have a pdf file with a page size of 186x65 mm2. If I print that on A4, I get printouts which are mainly white, except the 186x65 mm2. Is there a good way to get it printed in a compact way (e.g. 4 pages on top of each other on an A4 sheet)? I could not find an option in pdftk, so any advice or hint is welcome... If it is not so important that the individual pages' sizes are kept, you could arrange it with pdfjam: pdfjam --nup 1x4 --paper a4paper -o out.pdf in1.pdf in2.pdf in3.pdf in4.pdf It is part of package `texlive-extra-utils` and it will adjust the page format of the input files to fit "four over each other" by scaling them (keeping intact the proportions but not the exact sizes...) If you find something that keeps the sizes 100% as-is, that would be interesting for me, too. My current approach to this would be to create a LaTeX document with four \includegraphics[scale=1]{...}-statements, but that seems to be overly complicated for something that should be easier :) YMMV Linux-Fan [...]