GeneralPDF Information and Security

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
tpokala
Posts: 21
Joined: Wed Nov 10, 2010 6:13 pm

PDF Information and Security

Post by tpokala »

Hi,

I would like to ask how can I put general info about my .pdf file (to see it on file properties tab like author, keywords, etc

Second question - how can I secure my pdf document? I would like to block copy feature for example.
Last edited by tpokala on Thu Jan 20, 2011 9:55 am, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

PDF Information and Security

Post by frabjous »

You can add PDF information (usually called "metadata") with this command in the preamble for pdflatex:

Code: Select all

\pdfinfo
{ /Title (My Masterpiece)
  /Author (Your Name)
  /Creator (pdfLaTeX)
  /CreationDate (D:YYYYMMDDhhmmss) % this is the format used by pdf for date/time
  /Subject (...)
  /Keywords (...)
}
An alternative is to load the hyperref package:

Code: Select all

\usepackage[pdfauthor={Your Name},
            pdftitle={The Title},
            pdfsubject={The Subject},
            pdfkeywords={Some Keywords},
            pdfproducer={pdfLaTeX with hyperref},
            pdfcreator={pdfLaTeX}]{hyperref}
I don't think you can add security restrictions with pdflatex; you'll need to load it into something like Acrobat to do that. But seriously, don't do that. It's childish, and easily broken anyway. Just accept the fact that if you make something public, people can copy it. If this is a draft of something you do not want people to cite, put a note or watermark on it to that effect.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

PDF Information and Security

Post by localghost »

tpokala wrote:[…] Second question - how can I secure my pdf document? I would like to block copy feature for example.
Use a tool like PDFtk. A GUI for Wind0ws is available with PDFtk Builder. But as frabjous already pointed out, this kind of precautions can easily be levered out.


Thorsten
Post Reply