Skip to content

Instantly share code, notes, and snippets.

@mrdwab
Created August 8, 2014 10:33
Show Gist options
  • Save mrdwab/d0e8fd9d8a3a22d12d5a to your computer and use it in GitHub Desktop.
Save mrdwab/d0e8fd9d8a3a22d12d5a to your computer and use it in GitHub Desktop.
Use PDFtk to add a "stamp" or a "background" to a PDF and restrict editing/copying.
@echo off
if [%1]==[] goto :eof
:loop
pdftk %1 stamp back.pdf output "%~dpn1_new%~x1" owner_pw somepasswordyouwant
shift
if not [%1]==[] goto loop
@adityazainud
Copy link

Hello.

If I code one file at a time using:

pdftk 610221-02-49-A-R4.pdf stamp EDITTANGGAL_STEMPEL.pdf output x.pdf
It worked

But when I tried the code above, no file was created.

Why?

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment