[scribus] printing 2 A5 pages in a A4 sheet
Jan Schrewe
jschrewe at googlemail.com
Fri Oct 23 14:47:28 CEST 2009
Am Freitag 23 Oktober 2009 14:26:08 schrieb Federico Bruni:
> Hi all,
>
> my request is not related to Scribus but I know there are people here
> who can help me, and that's urgent: I need to print a flyer to
> distribute in a conference which takes place tomorrow.
>
> I have both A4 and A5 .pdf files (1 page). I want to print two copies
> for each page, so 2 A5 flyers for each A4 paper.
> Unfortunately I've never found a printer shop who was able to do it..
>
> These are the .pdf, just in case you want to try:
> http://fscons.org/helping
>
>
> Here's what I've done:
> * create a copy of the A5 .pdf
> * merge the two pdf in a two-page pdf file (A5)
>
> then I try to transform in A4 1 page:
>
> * either print to file with Okular --> but I get two pages, even
> though I've set landscape, no margins and two pages per sheet
>
> * or use the following commands:
> pdftk 1.pdf 2.pdf cat output 12.pdf
> pdf2ps 12.pdf
> psnup -l -Pa5 -pa4 -2 12.ps output.ps
> ps2pdf -sPAPERSIZE=a4 output.ps output.pdf
>
> the imposition is correct but I get a poor quality output
> maybe the problem is with the ps conversion, in fact I get these warnings:
>
> **** Warning: Generation number out of 0..65535 range, assuming 0.
> **** Warning: Generation number out of 0..65535 range, assuming 0.
> **** Warning: File has an invalid xref entry: 1. Rebuilding
> xref table.
>
> **** This file had errors that were repaired or ignored.
> **** The file was produced by:
> **** >>>> iText 2.1.5 (by lowagie.com) <<<<
> **** Please notify the author of the software that produced this
> **** file that it does not conform to Adobe's published PDF
> **** specification.
>
> Can anybody help me?
> I'm sorry for the OT request, please let me know which could be the
> right place where asking such information.
>
> Best regards,
I would use Acrobat Reader open the two page document and print to a file. The
scaling options are "Multiple Pages per Sheet". This should give you an A4
postscriptfile. The attached script should convert this back to pdf. This
generates an PDF X/3 if you don't need that, you might want to fiddle with
the ghostscript options.
Hope that helps
Jan
---
#!/bin/bash
TMPPATH="/tmp/"
function usage
{
echo "$0 is used to create a PDF-X document from a postscript file"
echo ""
echo "Options: $0 -h -p <profile> -t <title> -f <infile> -o <outfile> [-i
<infotext>]"
echo ""
echo "-h : display this help."
echo "-p <profile> : the colour profile embedded in the resulting PDF"
echo "-t <title> : The title of your PDF"
echo "-f <infile> : Name of the input file"
echo "-o <outfile> : Name of the output file"
echo "-i <infotext> : an optional infotext. If not given the title is used"
exit
}
while getopts "hp:t:i:f:o:" opt
do
case "$opt" in
h) usage ;;
p) PROFILE=$OPTARG ;;
t) TITLE=$OPTARG ;;
i) INFO=$OPTARG ;;
f) INFILE=$OPTARG ;;
o) OUTFILE=$OPTARG ;;
esac
done
# validate options
for x in "$PROFILE" "$TITLE" "$INFILE" "$OUTFILE"
do
if [ -z "$x" ]
then
echo "A parameter is missing, please check your arguments."
echo ""
usage
fi
done
# set info to title if no info was provided
if [ -z "$INFO" ]
then
INFO=$TITLE
fi
# create the PDF-X file to embedd
(
cat <<EOF
%!
% $Id: PDFX_def.ps 8284 2007-10-10 17:40:38Z giles $
% This is a sample prefix file for creating a PDF/X-3 document.
% Feel free to modify entries marked with "Customize".
% This assumes an ICC profile to reside in the file (ISO Coated sb.icc),
% unless the user modifies the corresponding line below.
systemdict /ProcessColorModel known {
systemdict /ProcessColorModel get dup /DeviceGray ne exch /DeviceCMYK ne and
} {
true
} ifelse
{ (ERROR: ProcessColorModel must be /DeviceGray or DeviceCMYK.)=
/ProcessColorModel cvx /rangecheck signalerror
} if
% Define entries to the document Info dictionary :
/ICCProfile ($PROFILE) def % Customize or remove.
[ /GTS_PDFXVersion (PDF/X-3:2002) % Must be so (the standard requires).
/Title ($TITLE) % Customize.
/Trapped /False % Must be so (Ghostscript doesn't provide
other).
/DOCINFO pdfmark
% Define an ICC profile :
currentdict /ICCProfile known {
[/_objdef {icc_PDFX} /type /stream /OBJ pdfmark
[{icc_PDFX} <</N systemdict /ProcessColorModel get /DeviceGray eq {1} {4}
ifelse >> /PUT pdfmark
[{icc_PDFX} ICCProfile (r) file /PUT pdfmark
} if
% Define the output intent dictionary :
[/_objdef {OutputIntent_PDFX} /type /dict /OBJ pdfmark
[{OutputIntent_PDFX} <<
/Type /OutputIntent % Must be so (the standard requires).
/S /GTS_PDFX % Must be so (the standard requires).
/OutputCondition (Commercial and specialty printing) % Customize
/Info ($INFO) % Customize
/OutputConditionIdentifier (CGATS TR001) % Customize
/RegistryName (http://www.color.org) % Must be so (the standard requires).
currentdict /ICCProfile known {
/DestOutputProfile {icc_PDFX} % Must be so (see above).
} if
>> /PUT pdfmark
[{Catalog} <</OutputIntents [ {OutputIntent_PDFX} ]>> /PUT pdfmark
EOF
) > $TMPPATH/pdfx.ps
# run gs
gs -dPDFX -dBATCH -dNOPAUSE -sProcessColorModel=DeviceCMYK -dDownsampleColorImages=false -dAutoFilterColorImages=/FlateEncode -dAutoFilterGrayImage=/FlateEncode -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -sOutputFile=$OUTFILE
$TMPPATH/pdfx.ps $INFILE
More information about the scribus
mailing list