[scribus] DPI and PDF question

avox avox at arcor.de
Wed Jul 23 20:33:34 CEST 2008




Nigel Ridley wrote:
> 
> Tino Schwarze wrote:
> ...
>> The command line for Linux looks like this (all in one line):
>> pdftops -level3 -paper match "$infile" - | gsc -q -dSAFER -dBATCH
>> -dNOPAUSE -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dAutoRotatePages=/None
>> -dEmbedAllFonts=true -dSubsetFonts=true -sOutputFile="$outfile"
>> -dCompatibilityLevel=1.4 -c .setpdfwrite -
>> 
>> By using the /ebook PDF setting, Ghostscript will downsample images and
>> the PDF get's real small.
>> 
>> HTH,
>> 
>> Tino.
>> 
> How do I actually use the script?
> I cd'd into the dir where the pdf is and executed your script and got this
> error message:
> 
> nigel at laptop:~/Hamaayan/Example$  "$infile" - | gsc -q -dSAFER -dBATCH
> -dNOPAUSE 
> -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dAutoRotatePages=/None
> -dEmbedAllFonts=true 
> -dSubsetFonts=true -sOutputFile="$outfile" -dCompatibilityLevel=1.4 -c
> .setpdfwrite -
> *** WARNING -- Unknown or improperly placed option: "q"
> *** WARNING -- Unknown or improperly placed option: "dSAFER"
> *** WARNING -- Unknown or improperly placed option: "dBATCH"
> *** WARNING -- Unknown or improperly placed option: "dNOPAUSE"
> *** WARNING -- Unknown or improperly placed option: "sDEVICE=pdfwrite"
> *** WARNING -- Unknown or improperly placed option: "dPDFSETTINGS=/ebook"
> *** WARNING -- Unknown or improperly placed option:
> "dAutoRotatePages=/None"
> *** WARNING -- Unknown or improperly placed option: "dEmbedAllFonts=true"
> *** WARNING -- Unknown or improperly placed option: "dSubsetFonts=true"
> *** WARNING -- Unknown or improperly placed option: "sOutputFile="
> *** WARNING -- Unknown or improperly placed option:
> "dCompatibilityLevel=1.4"
> *** WARNING -- Unknown or improperly placed option: "c"
> *** ERROR -- Can't find file "/home/nigel/Hamaayan/Example/.setpdfwrite"
> bash: : command not found
> nigel at laptop:~/Hamaayan/Example$
> 
> 

If you compare your output with the original, you'll notice that the
"pdftops -level3 -paper match"
part is missing from your command. Also not that you should replace $infile
and $outfile with the
actual filenames you use (or set them as shell variables).

Sample:

infile=myoriginalpdf ; outfile=myconverted.pdf; pdftops -level3 -paper match
"$infile" - | gsc -q -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite
-dPDFSETTINGS=/ebook -dAutoRotatePages=/None -dEmbedAllFonts=true
-dSubsetFonts=true -sOutputFile="$outfile" -dCompatibilityLevel=1.4 -c
.setpdfwrite -

Or, create a shellscript for it:
__________
#!/bin/sh
infile=$1
outfile=$2

pdftops -level3 -paper match "$infile" - | gsc -q -dSAFER -dBATCH -dNOPAUSE
-sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dAutoRotatePages=/None
-dEmbedAllFonts=true -dSubsetFonts=true -sOutputFile="$outfile"
-dCompatibilityLevel=1.4 -c .setpdfwrite -
__________


Put that in a file named "pdfcompress.sh" and run it with 
"sh pdfcompress myoriginal.pdf myconverted.pdf", or make it executable and
put it in your PATH.

HTH,
/Andreas
-- 
View this message in context: http://www.nabble.com/DPI-and-PDF-question-tp18547003p18617495.html
Sent from the Scribus New mailing list archive at Nabble.com.





More information about the scribus mailing list