|
Welcome to the PSTricks web site |
![]() | ||||||||||||||||||||||||||||||
|
2 a5 on one a4 page |
a4 to a5 conversion from PostScript to PDF |
Automatic export |
avi Videos as included files |
Bibliography hrefs | Bookmark | Color table | Color and pagebreak | Cropping whitespace | documentation | draftcopy watermark | Image as a hyperref | Extracting Images from a PDF file | Fonts | Forms in a pdf Document | Graphics Quality | hyperref-package | Index hrefs | Insert pdf pages of another document | MiKTeX | Papersize and pdflatex | pdftricks | PDF->ASCII | pdflatex and Papersize | pdftk (program) | PSTricks image as a hyperref | Two a5 on one a4 page | Watermark | Whitespace | Links to docs (related to PDF) Cropping whitespace of a pdf pageInserting a single or several pdf pages into another document is possible with the well known\inlcudegraphics macro. To cut the whitespace
around the text one can use the program pdfcrop, available on
CTAN.
It is important that the cropped pdf document has a \pagestyle{empty}, otherwise
the pagenumber is still there.
With the following script one can export all pages of a pdf file into single
cropped pdf files.
pdfbookmarkTo get a bookmark you can use\pdfbookmark[0]{My Chapter}{myAnchorName}
0: Level (0=chapter, 1=section, 2=subsection, ...)"My Chapter": Text"myAnchorName": anything which hyperref can use for the anchor name.
watermarkTo get a watermark for PDF document you cannot use packages which have a solution with PostScript commands (like the draftcopy package). Use the pdfdraftcopy or the following code in your preamble.\documentclass{article}
\usepackage{eso-pic}
\usepackage{graphicx}
\usepackage{color}
\usepackage{type1cm}
\makeatletter
\AddToShipoutPicture{%
\setlength{\@tempdimb}{.5\paperwidth}%
\setlength{\@tempdimc}{.5\paperheight}%
\setlength{\unitlength}{1pt}%
\put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%
\makebox(0,0){\rotatebox{45}{\textcolor[gray]{0.75}{\fontsize{5cm}{5cm}\selectfont{Draft}}}}
}
}
\makeatother
\begin{document}
Text
\end{document}
Video \documentclass{article}
\newsavebox{\MyBox}
\newcommand{\StartApp}[2]{%
\savebox{\MyBox}{#1}%
\hskip0pt
\pdfannot width \wd\MyBox height \ht\MyBox depth \dp\MyBox{
/Subtype /Link
/A <<
/S /Launch
/F (#2)
>> %/Border [16 16 0]
}#1}
\begin{document}
Hey, \StartApp{Klick mich!}{movie.mpeg}
\end{document}
Also have a look at easymovie.sty.
References By default pdflatex converts references (figure/table/equation-numbers) to links, which includes only the number and not the forgoing word like figure/table/Equation. To get this in the link too, write \hyperref[bar]{figure (\ref*{bar})} where bar is a label in any figure
environment.
a4 to a5 conversion from PostScript to PDF To get a a5-format pdf-output with ps2pdf from a a4 PostScript doc run
Graphics Quality To get better Graphics conversion from eps to pdf you can try some of the following options: For ps2pdf: -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -dEncodeColorImages=false -dEncodeGrayImages=false -dEncodeMonoImages=falseFor epstopdf: -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -sColorImageFilter=FlateEncode -sGrayImageFilter=FlateEncode -dPDFSETTINGS=/prepress -dUseFlateCompression=true Font Substitution To get a better output for pdf files substitute the fonts with \usepackage{lmodern}
or, if you do not have the lm fonts installed:
\usepackage{mathptmx}% instead of package times
\usepackage[scaled=0.9]{helvet} % or [scaled=0.92], if you like
\usepackage[scaled=0.92]{beramono}% do _not_ use courier
Forms in a PDF Document Download the TeX-demofile from CTAN and run it with
testfile.pdf what forms are possible for pdf.
Convert Files to pdf If you have a lot of files to convert from any type to pdf use the following bash command, which makes life easier, because it converts all files with extension "eps":
Insert whole a4 pages or two a5 on one a4 page in latex preamble \usepackage{pdfpages}
package maybe part of your local tex-installation or available at
CTAN.
In the text write for example:
\includepdf[pages={1-10}, nup=2, scale=1.414]{a5doc.pdf}
if you want to insert the pages 1-10 of the pdf-document a5doc.pdf in your actual document.
For a single pdf page you can also use:
\includegraphics[page={5}, scale=1.414]{a5doc.pdf}
it knows the optional argument page.
PDF->ASCII with
pdftk, a pdf toolkit. ExamplesMerge Two or More PDFs into a New Documentpdftk 1.pdf 2.pdf 3.pdf cat output 123.pdfor (Using Handles):pdftk A=1.pdf B=2.pdf cat A B output 12.pdfor (Using Wildcards):pdftk *.pdf cat output combined.pdf
Split Select Pages from Multiple PDFs into a New Documentpdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf
Rotate the First Page of a PDF to 90 Degrees Clockwisepdftk in.pdf cat 1E 2-end output out.pdfRotate an Entire PDF Document's Pages to 180 Degreespdftk in.pdf cat 1-endS output out.pdfEncrypt a PDF using 128-Bit Strength (the Default) and Withhold All Permissions (the Default)pdftk mydoc.pdf output mydoc.128.pdf owner_pw foopassSame as Above, Except a Password is Required to Open the PDFpdftk mydoc.pdf output mydoc.128.pdf owner_pw foo user_pw bazSame as Above, Except Printing is Allowed (after the PDF is Open)pdftk mydoc.pdf output mydoc.128.pdf owner_pw foo user_pw baz allow printingDecrypt a PDFpdftk secured.pdf input_pw foopass output unsecured.pdfJoin Two Files, One of Which is Encrypted (the Output is Not Encrypted)pdftk A=secured.pdf mydoc.pdf input_pw A=foopass cat output combined.pdfUncompress PDF Page Streams for Editing the PDF Code in a Text Editorpdftk mydoc.pdf output mydoc.clear.pdf uncompressRepair a PDF's Corrupted XREF Table and Stream Lengths (If Possible)pdftk broken.pdf output fixed.pdfBurst a Single PDF Document into Single Pages and Report its Data to doc_data.txtpdftk mydoc.pdf burstReport on PDF Document Metadata, Bookmarks and Page Labelspdftk mydoc.pdf dump_data output report.txt |
||||||||||||||||||||||||||||||