TIFFs als FullScreen A4 in ein PDF

Martin Heggemann martin.hf at gmx.de
Fri Apr 17 17:02:49 CEST 2009


Hallo Florian, 
hallo Liste,

falls das Thema noch nicht "durch" ist, zumindest für's Archiv:

Am Wed, 15 Apr 2009 22:26:37 +0200 schrieb Florian Lohoff <flo at rfc822.org>:

> Problem ist jetzt das ich mit tiff2pdf keine PDFs hinbekomme die:
> 
> 	a) Behaupten A4 zu sein
> 	b) In denen die TIFFs fullscreen sind

Gib tiff2pdf die Auflösung UND die Papiergröße mit!
Ich habe das wie folgt umgesetzt:

------------------------------------------------------------
# metrische Einheiten:
Einheit=m
# die Seitengroesse der PDF-Datei (in "cm" gemessen)
PBreite=21.0
PHoehe=29.7

PixelX=`tiffinfo ${DateiPrefix}.tiff | \
        grep Width | awk '{ print $3 }' | uniq`

PixelY=`tiffinfo ${DateiPrefix}.tiff | \
        grep Width | awk '{ print $6 }' | uniq`

DensityX=`echo "scale=3;${PixelX}*2.54/${PBreite}" | bc`
DensityY=`echo "scale=3;${PixelY}*2.54/${PHoehe}" | bc`

tiff2pdf -x ${DensityX} -y ${DensityY} \
         -u ${Einheit} -w ${PBreite} -l ${PHoehe} \
         -z -o ${DateiPrefix}.pdf ${DateiPrefix}.tiff
------------------------------------------------------------

Das ergibt dann wunderschöne formatfüllende A4-PDF-Dateien.

Gruß
  Martin

-- 

Bitte senden Sie mir keine Word- oder PowerPoint-Dateien.
http://www.gnu.org/philosophy/no-word-attachments.de.html 
http://www.goldmark.org/netrants/no-word/attach.html



More information about the Linux mailing list