Skip to content

Instantly share code, notes, and snippets.

@midu
Created January 25, 2011 16:27
Show Gist options
  • Save midu/795156 to your computer and use it in GitHub Desktop.
Save midu/795156 to your computer and use it in GitHub Desktop.
applies watermark to a pdf
i = 1
h.each_pair do |id, type|
puts "#{id} - #{i}/#{h.size}"
begin
eval "`python '/System/Library/Automator/Watermark PDF Documents.action/Contents/Resources/tool.py' --input #{id}/joined.pdf --output all/#{id}.pdf --scale=0.7 --yOffset=739 --xOffset=450 #{id}/thumb.png`"
rescue
puts "oh :("
end
i = i+1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment