Printing date on Pdfs Applescript

Discussion in 'Mac Programming' started by danyaywest, Oct 3, 2014.

  1. danyaywest macrumors newbie

    Joined:
    Oct 3, 2014
    #1
    Hi there

    New to the forums so go easy.

    Iv searched for the past couple of hours for a solution but cant find anything anywhere.

    Basically i need an application that i can open a pdf with that will print or watermark the date onto. Then i would need to print it an amount of times that i specify in a popup?

    I would preferably need it all in one application because of computer illiterate people who will be using it.

    Any help would be appreciated.
     
  2. kryten2, Oct 3, 2014
    Last edited: Oct 3, 2014

    kryten2 macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
  3. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #3
    That's pretty cool. I started thinking about a ghostscript based solution but almost lost the will to live halfway through... Automator looks like a much better option.
     
  4. danyaywest thread starter macrumors newbie

    Joined:
    Oct 3, 2014
    #4
    Cheers for the help guys.

    After a few more hours of messing around in Automator I nailed it.

    For anyone else needing a solution:

    1. Use the date variable and then the "create banner image from text" action. This creates the date as a .png file.[​IMG]

    2. I used the "Watermark PDF" action to place the .png file from above onto the pdf. Then opened the pdf in preview and printed. :D. Simples.[​IMG]

    I can run the first script on startup therefore giving me the correct date each day.

    Again thanks for the help. We got there in the end
     
  5. kryten2 macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #5
    I know what you mean :D

    Any reason why you use the Open Images in Preview action at the end?
    Perhaps you can use the Print Finder items action.
     
  6. danyaywest thread starter macrumors newbie

    Joined:
    Oct 3, 2014
    #6
    Ahh In all honesty I didn't even see that. Ha. I'll have a play when I get back to work next week.
    Thanks for everyone's help. Macrumors forums are awesome.
     

Share This Page