GeneralPDF Generation: Security and Adobe Tabs

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
sw3quant
Posts: 76
Joined: Tue Nov 02, 2010 11:40 pm

PDF Generation: Security and Adobe Tabs

Post by sw3quant »

I am using WinEdt, Vista and Miktex.

When I compile to a PDF, the PDF always has all the Book marks expanded.

This is annoying as I have a huge number of sections/chapters etc.

How do I tell latex to generate a PDF with bookmarks collapsed as in "collapse top-level bookmarks"?

Secondly, how do I make the PDF "SECURE" so people cant print it or copy and paste from it?

Thirdly, is there an easy way to get "DRAFT" written horizontally across each page (in v faint ink)?

thanks"

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

PDF Generation: Security and Adobe Tabs

Post by frabjous »

For the first one, you can use the bookmarksopenlevel option to hyperref:

Code: Select all

\usepackage[bookmarksopenlevel=0]{hyperref}
I believe the levels correspond to this table. It's possible that your PDF viewer saves the view for a given document however, which may override this.

I don't think it's possible to secure a PDF just using pdfLaTeX, and I'd advise against doing this. If someone really wants to copy from your text, they can always OCR it, and most DRM methods can be removed. Plus, you're doing a true disservice to people who need to alter your document to make it useable on a portable screen, or pass the text to a text to speech system because of a disability, and so on. But look at tools like pdftk or qpdf if you really must do this.

As for getting draft written across each page, look at packages like draftmark, draftcopy, watermark, draftwatermark or xwatermark. I use draftwatermark myself.
sw3quant
Posts: 76
Joined: Tue Nov 02, 2010 11:40 pm

Re: PDF Generation: Security and Adobe Tabs

Post by sw3quant »

do you have a MWE of draftwatermark?

I am having problems.
thanks!
sw3quant
Posts: 76
Joined: Tue Nov 02, 2010 11:40 pm

PDF Generation: Security and Adobe Tabs

Post by sw3quant »

Code: Select all

\usepackage{type1cm}
\usepackage{eso-pic}
\usepackage{color}
\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{6cm}{6cm}\selectfont{DRAFT}}}}%
        }%
    }
\makeatother

this seems to work.

Also, do you have any links to the SECURE packages you recommended? I couldnt find any.
thank you
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

PDF Generation: Security and Adobe Tabs

Post by frabjous »

They're not packages, but separate programs you'd apply to the output.

pdftk

qpdf
Post Reply