How to change the margins of PDF files while keeping the page size (“scale the content”)?

August 2nd, 2008 by matthias

This is on how to achieve that on Linux. There are multiple alternatives, but none of them proved perfect yet. Let’s start.

Alternative 1: using pstops

The task can be performed with pstops (whereof psnup is a simplified frontend).

  1. Convert your PDF file to a PS file, by printing to a file in Adobe Reader, or by using pdf2ps (Ghostscript-based) or pdftops (xpdf-based).
  2. Use pstops to adjust the marginspstops -p a4 "L@.9(1cm,1cm)" in.ps out.ps

    On mounting pages: here, the the task is to mount two A4 pages in A5 format on one A4 page, guaranteeing page margins of 3cm at left and right and 2cm at top and bottom. We need a width of 150mm and a height of 257mm. To scale 297mm (A4 height) to 150mm, use factor 0.505. Such n-up mounting together with freestyle adjustment of margins is not possible ith psnup, which has a simpler user interface.

    pstops -p a4 "2:0L@.505(18cm,2cm)+1L@.505(18cm,14.85cm)" in.ps out.ps

  3. Convert the PS file back to PDF by using pdftops.

The problem with psnup (from PSUtils Release 1 Patchlevel 17) and also of its frontend psnup is that it converts fonts to bitmap fonts (Adobe Type 3). This can be detected as rastered fonts when viewing the PDF file with Adobe Reader. It generates somewhat lower print quality, but is still acceptable. What is not acceptable (with respect to file size) is that pstops converts the whole file to an image if it has no idea how to treat it.

To debug pstops and psnup output, you can use the -b option, which will mark out the original pages’ borders.

Alternative 2: Using Adobe Reader and printer margins

This has not yet been worked out, but might be possible. When printing (to a file or otherwise) Adobe Reader will fit the pages into the printable area of the selected printer. Now the idea would be to choose the special printer “Custom …”. This allows you to enter a lp print command. Per the lp documentation, CUPS lp understands options to set the margins. For 2cm at top and bottom and 3cm at left and right, use this command:

/usr/bin/lp -o page-top=57 -o page-bottom=57 -o page-left=85 -o page-right=85

However, this currently does not work our, for an unknown reason. It does not change anything, i.e. the document is printed as if you selected “Page scaling: none” instead of “Page scaling: fit to printable area”. If this command is not possible, another alternative would be to set up a printer definition with exactly the margins you desire, in a way that lets you change these margins easily.

If you just need “larger” margins around your page (without exact measures), you can do the following:

  1. Print the file with Adobe Reader to a PS file. Use the option “Page scaling: fit o printable area”. Try several different printers including the “Custom …” special printer to find one that adds margins of the same size all around the page. This step will generate a PS file with larger margins than the original PDF file had, even though this is not correctly shown in the preview of Adobe Reader 8.1.1.
  2. Convert the file to a PDF file by using ps2pdf.
  3. Repeat from step 1 with your new PDF file until the margins are large enough for you.

This method has the obvious disadvantage of not allowing to specify the margins exactly, but at least the file retains vector fonts and graphics (unlike whenusing pstops, see above).

If you need the margin adjustents in combination with Adobe Readers n-up printing (e.g. 2 pages per sheet), and if you can adjust the margins in your source file (before generating the initial PDF), you can do the following: adust the margins in the original file so that, after the n-up scaling, these margins together with the selected printer’s margins, result in the margins you desire. When printing one two pages A4 on one sheet A4 with the special prnter “Custom …” in Adobe Reader 8.1.1, the following margins are used (measured in the output A4 page):

  • left 5,25mm
  • right 13,71mm
  • top 6,59mm
  • bottom 6,59mm (probably)

Alternative 3: Using Adobe Reader and printing the “current view”

Another alternative:

  1. Use Adobe Reader to print your page to a large sheet without scaling.
  2. Use ps2pdf to re-destill the PS file to PDF.
  3. Open the new PDF file in Adobe Reader and choose an appropriate view. Use the “print current view” option in Adobe Reader to print exactly thet view.
  4. Re-destill the PS output to PDF.
  5. That way, you can even achieve n-up mounting: say you generated to pages, each with content in different places and the rest white space. You can overlay these pages on top of each other using pdftk with the background option.

Alternative 4: Using ghostscript

The following would constitute an elegant solution: freely adjustable margins and vector fonts and images, and avoiding the GUI hassles. Sad enough, it does not work yet. The idea come from this thread.

gs \
  -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dSAFER \
  -dCompatibilityLevel="1.3" -dPDFSETTINGS="/printer" \
  -dSubsetFonts=true -dEmbedAllFonts=true \
  -sPAPERSIZE=a4 -sOutputFile="out.pdf" \
  -c "<</BeginPage{0.5 0.5 scale -90 rotate -2384 0 translate}>> setpagedevice" \
  -f in.pdf

The instruction works, apart from the important -c option part, which adds a postscript command. This instruction would also work with PDF files.

Posted in Acrobat Reader, DTP, Sprache: Englisch, alle Artikel | No Comments »

How can I do arbitrary vector-oriented modifications to a PDF file on Linux, though all the editors are still buggy?

August 1st, 2008 by matthias

If you have a PDF which you want to modify (and can’t get hold of the source format file), you might have tried scribus to open and change it. This works well for some simple cases, but there are many import errors for more complex files. Also, the same might happen with Inkscape if you have managed to convert the file to SVG format, e.g. using CorelDraw on a Windows virtual machine.

What’s always possible is to import the file in GIMP (“File -> Open”), using a high resolution such as 300dpi. But you might want to avoid the big file sizes and loss in quality, and want to do it vector-oriented.

Therefore, the following solution should work out:

  1. Convert a low resolution raster image version of the PDF file, e.g. by opening in GIMP (with 150dpi) and saving in JPG format.
  2. Create a OpenOffice.org Draw drawing with the same page size as your PDF file, and place the raster image file into the background.
  3. Now that you have the placement of things, change the appearance by adding other elements on top your background. You might want to get some vector oriented elements out of the PDF file by importing the file in scribus and saving as SVG or EPS file, importing that in OOo Draw.
  4. Export the OOo file to PDF, temporarily removing your background for that. The good thing is that all OOo Draw elements get high-quality vecor oriented PDF elements.
  5. Add your new PDF file on top of the original one, by saying something like:
    pdftk in.pdf stamp overlay.pdf output out.pdf;

As the original vector elements are never converted from PDF to another format and back, no import / export bugs can come in the way!

Posted in DTP, Graphikbearbeitung, OpenOffice, Sprache: Englisch, alle Artikel | No Comments »

How can I combine two PDF files so that they are “overlayed” one to the other?

July 21st, 2008 by matthias

This might become necessary if you want to add content to an already existing PDF file, e.g. when doing pre-press work for flyers etc.. For example, you might resize one PDF file to have additional place on the page, and put other content into that free space.

Get yourself two PDF files to overlay on each other, both of the same page size (else automatic resizing is employed), and both one-sided.

Then use this command to generate the combined PDF file with overlays:

pdftk file1.pdf background file2.pdf output out.pdf

Posted in Acrobat Reader, DTP, Sprache: Englisch, alle Artikel | No Comments »

How can I “magnify” a PDF document with DIN A4 pages to another one with DIN A3 pages?

June 5th, 2008 by matthias

Use Adobe Reader for that (here on Linux, but you could use another free Ghostscript based destiller on Windows, e.g. the PDF pseudo printer PrimoPDF).

  1. Open the document in Adobe Reader.
  2. Open the dialog “File -> Print …”.
  3. Select the printer “Custom …”, and in the combobox that appears at the right border of the dialog, select DIN A3 as paper size (you could also enter 420×297mm as custom paper size for this printer, or use a physical printer with both modes).
  4. Select “Page scaling: Fit to printable area”, and if necessary “Auto Rotate and Center”.
  5. Select “Print to file”, and select a file to print to.
  6. Press “OK”.
  7. The resulting file is a postscript file. The page size of a postscript file can be auto detected, or manually set. Here, re-destilling to PDF with ps2pdf gets the page size wrong (it uses DIN A4). Therefore, open the document in kghostview and print it from there to a PDF file (it has correct page size auto detection, see the menus).

One can probably use ps2pdf when telling it about the desired page size explicitly, but I haven’t tested that yet:

ps2pdf -sPAPERSIZE=a3 file.ps

Posted in Acrobat Reader, DTP, Sprache: Englisch, alle Artikel | No Comments »

Wie konfiguriere und verwende ich pdflatex mit LyX?

May 25th, 2008 by matthias

1. Einleitung

Das folgende Dokument ist eine Anleitung zur Verwendung von LyX und pdfLaTeX. Die Lizenz dieses Dokuments ist public domain. Ergänzungen und Korrekturen zu diesem Dokument bitte in den Kommentaren! Auch Tipps aus eigener Erfahrung mit pdflatex und LyX sind gern gesehen!

2. Installation notwendiger Pakete

Die folgende Anleitung gilt für SuSE Linux 7.2 oder höher.

Es werden bei SuSE Linux 7.2 die folgenden Pakete aus der Serie tex (YaST1) bzw.
benötigt:

  • lyx
  • te_ams
  • te_cont
  • te_latex
  • te_pdf
  • te_pscm
  • tetex
  • transfig
  • xfig

3. pdfLaTeX konfigurieren

  1. Dokumentation von pdfLaTeX. Die Dokumentation von pdflatex ist /usr/share/doc/packages/te_latex/texmf/pdftex/base/pdftexman.pdf und /usr/share/doc/packages/te_latex/texmf/pdftex/base/pdfTeX-FAQ.pdf.
  2. Font-Mapping. Alle in einem LaTeX-Dokument verwendeten Schriftarten sollen auch im Adobe Type1-Format vorliegen. Nur solche Schriftarten werden im Acrobat Reader auf dem Bildschirm in guter Qualität angezeigt. Ist eine LaTeX-Schriftart nicht in einer Adobe Type1-Version vorhanden, so wird aus ihr eine Adobe Type3-Version (Bitmap-Schriftart) erzeugt und diese für die PDF-Datei verwendet. Acrobat Reader zeigt solche Type3-Schriften jedoch in sehr unleserlicher Qualität an, druckt sie jedoch recht ordentlich.
    Die normalerweise benutzten LaTeX-Schriftarten sind die europäischen ComputerModern-Fonts (ecfonts 1.0, vgl. /usr/share/texmf/fonts/source/jknappen/ec/). Das Paket cm-super enthält die Adobe Type1-Versionen all dieser Schriftarten, d.h. man muss es installieren:

    • Download von cm-super: Einfach die Adresse
      ftp.uni-bielefeld.de/pub/tex/fonts/ps-type1/cm-super.tar.gz verwenden.
      Die Paketgröße beträgt etwa 55MB.
    • Wer einen anderen CTAN-Mirror verwenden will, gehe zuerst auf
      www.ctan.org, wähle den Link »Look through«. Man navigiere sich durch die Links dann zu /fonts/ps-type1/cm-super/ und wähle den Link »entire directory«. Zu gegebener Zeit kann man dann noch den gewünschten CTAN-Mirror auswählen und erhält dann das Paket.
    • Man installiert das Paket nach den beiliegenden Installationsanweisungen.
    • Zum Abschluss der Installation muss man die ls-R-Datenbank des TeX-Systems erneuern, was auch der cron-Daemon täglich tut. Dazu ruft man das Skript mktexlsr auf. So finden LaTeX-Komponenten neu installierte Dateien, von denen nur der Name ohne Verzeichnis angegeben wird, z.B. Fonts in den FontMapping-Tabellen. Vergleiche zur ls-R-Datenbank die Dokumentation in /usr/share/texmf/doc/programs/kpathsea.pdf, Abschnitt 3.4.1 ‘ls-R’. Denn etliche Dateien werden nur in der ls-R-Datenbank und nicht auf Festplatte gesucht, wie die Zeichenkette »!!« in den von pdflatex -k 255 <datei.tex> ausgegebenen Suchpfaden zeigt. Die ls-R-Datenbank ist /var/lib/texmf/db/ls-R.
    • Nach der Installation muss man noch die FontMapping-Tabelle pdftex.map anpassen oder sogar neu erzeugen; auf diese Datei wird in der Konfigurationsdatei pdftex.cfg verwiesen. Man wechselt dazu ins Verzeichnis /var/lib/texmf/dvips/config/ und kopiert alle .map-Dateien aus dem Paket cm-super hierhin. Diese Dateien fügt man dem Skript updmap im entsprechenden Abschnitt hinzu und ruft es dann in diesem Verzeichnis auf: ./updmap. Die entstandene Datei pdftex.map kopiert man nun noch nach /var/lib/texmf/pdftex/config/.
  3. Um zu testen, ob die pdftex-Installation inkl. der Einrichtung der FontMapping-Tabelle gelungen ist, wechselt man ins Verzeichnis /usr/share/doc/te_latex/texmf/pdftex/base/ und führt aus: pdftex example.tex. Es sollte eine pdf-Datei erzeugt werden, die Adobe Type1 Fonts enthält; man kann dies im Dialogfeld »File | Document Info | Fonts ...« im Acrobat Reader nachprüfen: Hier muss unter »Type« stehen »Type 1« und nicht »Type 3«.

4. hyperref mit pdfLaTeX einrichten

Mit hyperref werden alle dokumentinternen Querverweise, Quellenangaben und Internet-Links zu Hyperlinks in der PDF-Datei. Das Paket hyperref ist in TeTeX, der TeX-Distribution von SuSE, bereits enthalten und wurde bereits mit installiert. Die Dokumentation zum Paket hyperref ist /usr/share/doc/packages/te_latex/texmf/latex/hyperref/manual.pdf

Um Hyperlinks zu erhalten, muss der LaTeX-Vorspann einer TeX-Datei etwa folgendes enthalten. In LyX gibt man diesen Text im Dioalogfeld »Layout | LaTeX Vorspann« ein, er wird wie er ist beim Export in die LaTeX-Datei übernommen:

\usepackage{hyperref}
\hypersetup {
   pdftex=true,
   hyperindex=true,
   colorlinks=true,
   bookmarks=true,
   bookmarksnumbered=false,
   pdfpagemode=None,
   bookmarksopen=false,
   pdftitle=Vorlesungsmodul Praktische Mathematik,
   pdfauthor=Matthias Ansorg,
   pdfcreator=pdfTeX (Web2C 7.3.1) 3.14159-0.13d,
   pdfstartview=FitBH
}

5. LyX konfigurieren und verwenden

Ich empfehle dringend, das beim ersten Start angezeigte Tutorial von LyX und auch die einführenden Kapitel der Dokumentation zu lesen, um LyX bedienen zu lernen. Es gibt einige wichtige Unterschiede zwischen LyX und einer normalen Textverarbeitung!

Hat man ein Dokument in LyX erstellt, aus dem jetzt ein PDF-Dokument werden soll, so geht man folgendermaßen vor: In LyX ruft man den Menüpunkt »Datei | Exportieren | LaTeX« auf, wechselt in einem Terminal in das Verzeichnis der exportierten Datei und gibt den Befehl »pdflatex <dateiname>.tex« auf. Man sollte nicht direkt den Menüpunkt »Datei | Exportieren | PDF (pdflatex)« in LyX aufrufen, denn hier benötigt pdflatex mehrere hundert mal (!) so lange, um das Dokument zu berechnen. Das liegt irgendwie daran, dass dann alles in einem temporären Verzeichnis abläft. Dasselbe Verfahren wendet man an, wenn man ein dvi-Dokument aus einem LyX-Dokument erzeugen will.

Empfehlenswerte Layout-Einstellungen in LyX unter »Layout | Dokument ...«:

  • LaTeX-Dokumentenklasse
    • »article« für normale Anforderungen.
    • »article (AMS, sequential numbered)« für rein mathematische Dokumente.
  • Sprache german
  • Anführungszeichen »text« doppelt.
  • Seite A4 Hochformat, verwende Paket Geometry
  • »Extras | Plazierung von Floats | tbp«
  • »Extras | AMS Math benutzen« nur, wenn besondere, sonst nicht verfügbare mathematische Zeichen benötigt werden.

Mögliche Standards für die Benennung der Labels für Querverweise in LyX:

  • Formeln, Gleichungen: eq.<name>
  • Beispiele im AMS-Stil Example: exp.<name>
  • Definitionen im AMS-Stil Definition: def.<name>
  • Abbildungen: Abb_<dateiname-ohne-endung>

6. Grafiken verwenden zusammen mit LyX und pdfLaTeX

Alle Grafikdateien, die in Dokumenten eingebunden werden, die mit pdflatex
kompiliert werden sollen, müssen (!) im Format PDF sein. Weil pdflatex im
Gegensatz zu LaTeX alles nach dem ersten Punkt im Namen einer Datei als ihre
Endung betrachtet und PDF-Dateien an der Endung .pdf erkennt, dürfen die
einzunbindenden PDF-Dateien keine 2 Punkte im Dateinamen haben.

Posted in DTP, LyX & LaTeX, Sprache: Deutsch, alle Artikel | No Comments »

Wie kann ich hyperref zusammen mit pdflatex verwenden? Ich erhalte den Fehler »pdfTeX error (ext4): link annotations can’t be nested.« (bei jedem Backend-Treiber).

May 25th, 2008 by matthias

Die genaue Fehlermeldung ist, egal welchen Backend-Treiber ich für
hyperref verwende (hypertex oder pdftex):

pdfTeX error (ext4): link annotations can't be nested.
    <to be read again>
                 \endgroup

In LaTeX gibt es zwei verschiedene Arten von Befehlen: fragile und
robuste. Bei ihrer Verwendung ist im Normalfall zu beachten: Kommt ein fragiler
Befehl in einem »moving argument« vor, so ist er mit einem unmittelbar
vorausgehenden \protect -Befehl zu schützen. Ein
»moving argument« ist ein Text (Argument eines Befehls), der
an andere Stellen im Dokument gesetzt werden kann – hauptsächlich
die Argumente von \caption{ } (tauchen wieder in der Abbildungsliste
auf), \section{ }, \subsection{ } und
\subsubsection{ } (tauchen wieder im Inhaltsverzeichnis auf).

Für pdfLaTeX bedeutet das: Ein »moving argument« wird im
Normalfall von hyperref zu einem Hyperlink gemacht. Enthält es selbst
einen Link, so müssten Links geschachtelt werden, was nicht möglich ist.
Genau darüber beschwert sich pdfLaTeX: »link annotations can’t be
nested«. Einige Fälle, in denen dieser Fehler auftrat, waren z.B.:

  • \ref{ } innerhalb von \caption{ }
  • \ref{ } innerhalb von \subsubsection{ }
  • \cite[ ]{ } innerhalb von \subsubsection{ }

Die Zeile, in der pdfLaTeX den Fehler anmerkt, stimmt ganz und gar nicht mit der
Zeile überein, die den Fehler enthält. Man muss den Fehler also
selbst zurückerfolgen.

Dazu kopiert man das Dokument (als .tex-Datei!) mit allen benötigten
Abbildungen usw. in einen eigenen Testordner und entfernt dann
stückweise die \ref { } und \cite[ ]{ }
-Befehle aus der Datei. Das geschieht effektiv mit Hilfe des vi-Befehls
:%s/\\ref{.*}//gc, den man einfach nach dem Aufruf von
vi <dateiname&gt.tex eingibt und dann einige Ersetzungen
mit y bestätigt. Man behält sich jeweils die Dateiversion vor dem
letzten Schritt der Ersetzungen, versucht pdflatex laufen zu lassen und
vergleicht die Datei mit dem letzten Backup, wenn der Lauf gelang: diff
<dateiname>.tex <dateiname>Backup1.tex
. Die Ausgabe zeigt
dann, wo der Fehler liegt.

Achtung: Nur jeder zweite pdflatex-Lauf misslingt, denn nur in jedem zweiten
Lauf sind ungelöste Referenzen vorhanden, die zu Hyperlinks konvertiert
werden sollen.

Um diesen Fehler nicht auftreten zu lassen, verwende man keine Hyperlinks in
»moving arguments«. Es gibt auch noch die (von mir noch nicht getestete)
Möglichkeit, alternative Zeichenketten anzugeben:

\documentclass{article}
\usepackage{url}
\usepackage[pdftex]{hyperref}
\begin{document}
\tableofcontents
\section{New files at \texorpdfstring{%
   \protect\url{www.franken.de}}{%
   \tetxtt{www.franken.de}}}
\end{document}

Posted in DTP, LyX & LaTeX, Sprache: Deutsch, alle Artikel | No Comments »

How can I mount 4 flyers (A6 size) onto an A4 sheet for printing them out?

May 8th, 2008 by matthias

What you want is placing the four flyers in 2×2 format on a sheet of A4 paper, the way they match that paper size, without any additional borders around the A4 page or between the flyers.

Therefore, when designing the flyers in OpenOffice.org Draw, you cannot use its “tile” option for printing out, as the page margins of the original flyer will get collapsed. Also, you cannot use Adobe Reader’s “multiple pages per sheet” printing option, as there is no way to eliminate the printer’s border around the whole page.

However, on Linux there is a nice tool psnup. What to do: Export your flyer to a PDF file. If you use OOo, that’s a built-in function. Then create a PDF file with four flyers, each rotated by 90°, from that. It’s difficult to use unrotated pages in A6 landscape paper size as input to psnup, as the “-l”, “-s” and “-f” options are not well documented and have unprecedented effects. So we use pdftk to rotate the pages beforehand. The command to use:

pdftk flyer.pdf cat 1E 1E 1E 1E output flyer.fourpages.pdf;

Now we need to generate PostScript, as psnup operates on that. To convert to from PDF to PostScript, one cannot use “pdftops -paperw 298 -paperh 421 flyer.fourpages.pdf” (as text is converted to images) and also not “pdf2ps flyer.fourpages.pdf;” (as this crashes). Therefore, print with Adobe Reader, using “Custom” printer, and the options “Choose paper source by PDF page size” and “Print to File”.

Now we can use psnup and after that, create a PDF again:

psnup -H 14.85cm -W 10.5cm -h 29.7cm -w 21cm -d -4 flyer.fourpages.ps flyer.4nup.ps;
ps2pdf flyer.4nup.ps;

To conclude, you can perhaps (if necessary at all) reduce the size of the PDF file to 10% by printing it in Adobe Reader to a PostScript File and converting to PDF again with ps2pdf.

The option “-d” draws a box around each of the four mounted pages, remove for production use, it’s for diagnostics only. And another note out of scope: note that the -s option expects a coefficient (0 to 1), 1 meaning to scale at 100%.

Posted in Acrobat Reader, DTP | No Comments »

Wie kann ich eine in A4 Querformat gesetzte PDF-Datei (PDF-Seiten haben Querformat) so in 4 NUP drucken dass die Seiten die korrekte Reihenfolge haben wenn man sie in Zeilen bzgl. Querformat statt Hochformat anordnen will?

May 2nd, 2008 by matthias

Einfachste Lösung:

  1. psnup -f -4 infile.ps outfile.ps;

Direkt auf PDF-Dateien:
Statt 1,2,3,4 muss die Reihenfolge sein 2,4,1,3 (Start mit 2, dann wiederholend +2,-3,+2,+3). Also kann man die Seiten wie folgt umordnen:

  1. pdftk input.pdf cat 2 4 1 3 6 8 5 7 10 12 9 11 14 16 13 15 18 20 17 19 22 24 21 23 26 28 25 27 30 32 29 31 34 36 33 35 38 40 37 39 42 44 41 43 46 48 45 47 50 52 49 51 54 56 53 55 58 60 57 59 62 64 61 63 66 68 65 67 70 72 69 71 74 76 73 75 78 80 77 79 82 84 81 83 86 88 85 87 90 92 89 91 94 96 93 95 output output.pdf

Konkretes Beispiel:

  1. pdftk BTF.Tour22.pdf cat 3-95 output BTF.Tour22.S3-95.pdf;
  2. pdftk BTF.Tour22.S3-95.pdf cat 2 4 1 3 6 8 5 7 10 12 9 11 14 16 13 15 18 20 17 19 22 24 21 23 26 28 25 27 30 32 29 31 34 36 33 35 38 40 37 39 42 44 41 43 46 48 45 47 50 52 49 51 54 56 53 55 58 60 57 59 62 64 61 63 66 68 65 67 70 72 69 71 74 76 73 75 78 80 77 79 82 84 81 83 86 88 85 87 90 92 89 91 94 96 93 95 output BTF.Tour22.S3-95.for4nup.pdf

Und dann in 4nup umwandeln, am besten durch Drucken in Acrobat Reader in eine PDF-Datei mit Einstellung 4nup. Man sollte nicht aus OOo Writer direkt in 4nup drucken weil dann ggf. Seitenbereiche abgeschnitten werden.
Wenn sowohl Acrobat Reader als auch xpdf/kpdf Probleme mit Schriftarten beim Drucken dieser Dateien haben liegt es nicht an pdftk! Am besten dann grafisch drucken (z.B. nach Öffnen mit GIMP).

Posted in Acrobat Reader, DTP | No Comments »

Wie kann ich eine PDF-Datei mit Seiten in A4 Querformat in eine mit Seiten in A4 Hochformat umwandeln? Bzw. wie drucke ich unter Linux ein PDF-Dokument mit einer Seite A4 im Querformat auf Papier in A4 im Hochformat?

May 2nd, 2008 by matthias

Einfachste Lösung: Seiten drehen mit pdftk (siehe Optionen zum cat-Befehl). Beispiel:

  1. pdftk BTF.Tour22.final.pdf cat 1-2W 3-endN output BTF.Tour22.PrintMaster.pdf

Dabei muss man wissen welche Seiten im Dokument ggf. schon eine Rotation zugewiesen haben, und welche. Das findet man durch Experimente heraus indem man zuerst einmal alle Seiten auf denselben Rotationswert
(am besten N, d.h. 0°) setzt (wird absolut gemessen, bssherige Rotationswerte werden dadurch also zurückgesetzt).

Einfache Lösung: in Acrobat Reader mit der Funktion »Rotate View« die Seite auf A4 Hochformat drehen und dann drucken mit Normaleinstellungen für Hochformat. Wenn wieder eine PDF-Datei daraus werden drucke man in eine PDF-Datei.

Eine Alternative. Beobachtungen: »Druckausrichtung« in den Druckereinstellungen auf Querformat zu stellen druckt eine leere Seite. In Acrobat Reader gar nichts zu verstellen druckt einen Teil des Inhalts 90° ggü. dem Original verdreht, beginnend oben auf der Seite. In Acrobat Reader unter »File -> Print Setup …« Landscape einzustellen druckt einen Teil des Inhalts 90° ggü. dem Original verdreht, beginnend mitten auf der Seite. Die Lösung: man muss sowohl in Acrobat Reader unter »File -> Print Setup …« Landscape einstellen als auch in den Druchereinstellungen Querformat einstellen.

Lösung über OpenOffice.org Writer: Datei Drucken »in Datei« (mit welchem Drucker ist eigentlich egal, z.B. mit dem für extendedPDF eingerichteten) und wählen als Papierformat des Druckers A4 Portrait. Probleme: Acrobat Reader kann solche Dateien nicht lesen, nur kghostview.

Eventuell eine weitere Möglichkeit: etwas wie:

  1. acroread -toPostScript -landscape file.pdf

Posted in Acrobat Reader, DTP | No Comments »

Tipps zur Erstellung qualitativ hochwertiger PDFs?

April 29th, 2008 by matthias

www.planetpdf.com/planetpdf/pdfs/pdf2k/03w/perets_bestprocedures.pdf

Posted in DTP | No Comments »