Automator Watermark PDF Issues

I just updated to Yosemite (OS X 10.10) and the Watermark PDF function in Automator has stopped working. Each time it gets to this function, it returns an error message. I have tried replacing the function and even rewriting the Automator sequence but have not had any luck. I have also confirmed that it is not a renaming issue with the file or a problem with the picture itself. Has anyone had this problem or could they suggest a solution?

I have exactly the same problem!
Upgraded to Yosemite last night (to 10.10.1 actually) and this morning the Watermark PDF does not work anymore!
Exactly the same automator file that still worked yesterday!
Although this is a simple automator sequence (open folder, get all the files, watermark and put the files in a different folder), it is mission critical for me.
I'll post this problem in a few places and see if I get a response, if not its back to Mavericks tonight. Fortunately I have a Time Machine backup....

Similar Messages

  • Automator Watermark PDF Workflow

    Seems with every major upgrade, Apple breaks the Automator Watermark PDF Workflow.
    Can someone test this workflow in Yosemite so I know if the problem I'm having is with OS X 10.10.

    Hello
    Under 10.6.8, Watermark PDF Documents.action/Contents/Resources/tool.py works happily without any errors when invoked as follows with a.pdf and watermark.png in ~/desktop/test/ :
    #!/bin/bash
    py='/System/Library/Automator/Watermark PDF Documents.action/Contents/Resources/tool.py'
    cd ~/desktop/test || exit
    args=(
        --input     a.pdf
        --output    a_wm.pdf
        --verbose
        --over
        --xOffset   0.0
        --yOffset   -150.0
        --angle     300.0
        --scale     0.3
        --opacity   0.1
        watermark.png
    "$py" "${args[@]}"
    If the said error – ValueError: depythonifying 'pointer', got 'str' – is raised at the line:
    provider = CGDataProviderCreateWithFilename(imagePath)
    I'd think it is because imagePath is not a C string pointer which the function expects but a CFStringRef or something which is implicitly converted from python string. Since I don't get this error with pyobjc 2.2b3 & python 2.6 under 10.6.8, it is caused by something introduced in later versions.
    Anyway, the statement in question may be replaced with the following statements if it helps:
    url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, imagePath, len(imagePath), False)
    provider = CGDataProviderCreateWithURL(url)
    I modified the tool.py with these changes along with other minor fixes and run it successfully under 10.6.8. I'm not sure at all whether it works under later OSes as well. And even if it does, editing tool.py will require the Automator action to be re-codesigned.
    Here's the revised tool.py.
    #!/usr/bin/python
    # Watermark each page in a PDF document
    import sys #, os
    import getopt
    import math
    from Quartz.CoreGraphics import *
    from Quartz.ImageIO import *
    def drawWatermark(ctx, image, xOffset, yOffset, angle, scale, opacity):
        if image:
            imageWidth = CGImageGetWidth(image)
            imageHeight = CGImageGetHeight(image)
            imageBox = CGRectMake(0, 0, imageWidth, imageHeight)
            CGContextSaveGState(ctx)
            CGContextSetAlpha(ctx, opacity)
            CGContextTranslateCTM(ctx, xOffset, yOffset)
            CGContextScaleCTM(ctx, scale, scale)
            CGContextTranslateCTM(ctx, imageWidth / 2, imageHeight / 2)
            CGContextRotateCTM(ctx, angle * math.pi / 180)
            CGContextTranslateCTM(ctx, -imageWidth / 2, -imageHeight / 2)
            CGContextDrawImage(ctx, imageBox, image)
            CGContextRestoreGState(ctx)
    def createImage(imagePath):
        image = None
        # provider = CGDataProviderCreateWithFilename(imagePath)    # FIXED: replaced by the following CGDataProviderCreateWithURL()
        url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, imagePath, len(imagePath), False)
        provider = CGDataProviderCreateWithURL(url)
        if provider:
            imageSrc = CGImageSourceCreateWithDataProvider(provider, None)
            if imageSrc:
                image = CGImageSourceCreateImageAtIndex(imageSrc, 0, None)
        if not image:
            print "Cannot import the image from file %s" % imagePath
        return image
    def watermark(inputFile, watermarkFiles, outputFile, under, xOffset, yOffset, angle, scale, opacity, verbose):
        images = map(createImage, watermarkFiles)
        ctx = CGPDFContextCreateWithURL(CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, outputFile, len(outputFile), False), None, None)
        if ctx:
            pdf = CGPDFDocumentCreateWithURL(CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, inputFile, len(inputFile), False))
            if pdf:
                for i in range(1, CGPDFDocumentGetNumberOfPages(pdf) + 1):
                    image = images[i % len(images) - 1]
                    page = CGPDFDocumentGetPage(pdf, i)
                    if page:
                        mediaBox = CGPDFPageGetBoxRect(page, kCGPDFMediaBox)
                        if CGRectIsEmpty(mediaBox):
                            mediaBox = None
                        CGContextBeginPage(ctx, mediaBox)
                        if under:
                            drawWatermark(ctx, image, xOffset, yOffset, angle, scale, opacity)
                        CGContextDrawPDFPage(ctx, page)
                        if not under:
                            drawWatermark(ctx, image, xOffset, yOffset, angle, scale, opacity)
                        CGContextEndPage(ctx)
                del pdf
            CGPDFContextClose(ctx)
            del ctx
    def main(argv):
        verbose = False
        readFilename = None
        writeFilename = None
        under = False
        xOffset = 0.0   # FIXED: changed to float value
        yOffset = 0.0   # FIXED: changed to float value
        angle = 0.0     # FIXED: changed to float value
        scale = 1.0     # FIXED: added
        opacity = 1.0
        # Parse the command line options
        try:
            options, args = getopt.getopt(argv, "vutx:y:a:p:s:i:o:", ["verbose", "under", "over", "xOffset=", "yOffset=", "angle=", "opacity=", "scale=", "input=", "output=", ])
        except getopt.GetoptError:
            usage()
            sys.exit(2)
        for option, arg in options:
            print option, arg
            if option in ("-i", "--input") :
                if verbose:
                    print "Reading pages from %s." % (arg)
                readFilename = arg
            elif option in ("-o", "--output") :
                if verbose:
                    print "Setting %s as the output." % (arg)
                writeFilename = arg
            elif option in ("-v", "--verbose") :
                print "Verbose mode enabled."
                verbose = True
            elif option in ("-u", "--under"):
                print "watermark under PDF"
                under = True
            elif option in ("-t", "--over"):    # FIXED: changed to "-t" from "t"
                print "watermark over PDF"
                under = False
            elif option in ("-x", "--xOffset"):
                xOffset = float(arg)
            elif option in ("-y", "--yOffset"):
                yOffset = float(arg)
            elif option in ("-a", "--angle"):
                angle = -float(arg)
            elif option in ("-s", "--scale"):
                scale = float(arg)
            elif option in ("-p", "--opacity"):
                opacity = float(arg)
            else:
                print "Unknown argument: %s" % (option)
        if (len(args) > 0):
            watermark(readFilename, args, writeFilename, under, xOffset, yOffset, angle, scale, opacity, verbose);
        else:
            shutil.copyfile(readFilename, writeFilename);
    def usage():
        print "Usage: watermark --input <file> --output <file> <watermark files>..."
    if __name__ == "__main__":
        print sys.argv
        main(sys.argv[1:])
    All the best,
    H

  • Automator - Watermark PDF Documents

    Since Lion, I'm unable to use the Auromator Action "Watermark PDF Documents"
    I can select a .png file for the watermark, but it does not list in the action (see below)
    Can someone confirm that they are also unable to get this action to work, as I would like to isolate this as a Lion issue and not a system issue on my end.

    The answer to your problem is also on this page:
    http://superuser.com/questions/384967/add-a-header-to-every-page-in-a-pdf
    You can use the Watermark PDF documents action in Automator to add an image on every page of a PDF file. You can specify location, scale, rotation, and opacity.
    Manually fixing the workflow for Mac OS X Lion
    Set up the entire automator workflow as you would, but skip adding the watermark image (you can't). Save the workflow to a file. Right-click the workflow in Finder and select Show Package Contents and navigate into Contents. Opendocument.wflow in a text editor, e.g. TextMate.
    The actual parameters and their values are stored in the ActionParameters dictionary. The relevant key isfilenames. By default, it looks like this:
    <key>ActionParameters</key> <dict> <key>angle</key> <integer>0</integer> <key>fileNames</key> <array/> <key>onePDF</key> <false/>
    Just edit the <array/> declaration and add all files as <string>s, like so:
    <key>fileNames</key> <array> <string>/Users/danielbeck/Desktop/test.png</string> </array>
    Save the file, and reopen the workflow in Automator. The image will be correctly listed, and you can fix its position and other properties, before you apply it.
    Remember that the workflow does not replace the input file as many others do, the output is written to a temporary file. Use the Move Finder Items action afterwards.

  • Automator: Watermark PDF Documents not supplied required data?

    I want to create a letterhead background on a Numbers document so I can email a Numbers document on my letterhead. I haven't found an easy answer so far until I came across the Watermark PDF Document feature in Automator. That would work perfectly, problem is, I can't get it to work at all. No matter what I have added, subtracted or rearranged I get the same results....The action "Watermark PDF Document" was not supplied with the required data. I'm really not sure what I'm doing wrong. Can someone walk me through what it is suppose to look like? I want it as a printer workflow so I can just take the document I'm working on in Numbers, go to the print menu, as if I was going to "print" it in to Preview, and it will convert it to PDF then put the watermark on it. I have done lots of research to try and figure out what I am doing wrong...and I hope it's something really silly because I am getting so frustrated.
    Thanks!

    I couldn't find the QuickLook folder but I took a screen shot.
    What I am asking for is someone to tell me what the workflow should look like.
    I have tried
    -Get Specified Finder Items
    -Launch Application (Preveiw)
    -Watermark PDF Documents
    -Move Finder Items
    -Rename Finder Items/Rename PDF Documents
    -View Results
    ..and all combinations of those items. I tried Watermark PDF Documents by iteslef as a Print Plugin...it gets to Preview but there is no watermark.
    No matter what I try the same result happens "The action 'Watermark PDF Documents' was not supplied with the required data."
    I have tried JPEG and PNG images, several different files with different sizes, shapes and colors. I even tried the images you supplied above. It never works.
    I'd love for someone to be able to make it work on their computer then tell me how they did it so I can duplicate it. If if still doesn't work for me then I'll know it's something to do with my computer.

  • Automator Watermark PDF Document

    WIth Lion I'm unable to add a .png file (or any image file) as a Watermark in the Automator action: PDF->Watermark PDF Document.
    This Worked for me in Snow Leopard.
    Can someone see if they get this to work?
    Tony

    Thanks.
    I already filed a bug report. 
    If you would like to also: http://www.apple.com/feedback/macosx.html

  • How can I add a picture to the Automator Action "Watermark PDF Documents.action"

    Looks like a bug: under 10.7.2 i cannot add a picture to the Automator Action "Watermark PDF Documents.action".
    Works perfectly under 10.6.8.

    Its a verified bug (Automator - Watermark PDF Documents).
    Please report to http://www.apple.com/feedback/macosx.html
    As a workaround, if you saved the Action in SL, option-click the action, navigate to the file "document.wflow", open in TextEdit, search for the key "fileNames" and replace your old image with the new

  • Problem using Automator to create "Watermark PDF Documents"

    After having updated our macs from Mavericks to Yosemite, the "Watermark PDF Documents" using Automator is no longer working.

    Hi Miykael,
    Do you have flash player installed on your system for that browser? Did you tried accessing that pdf file from a different browser?
    I would also recommend you to refer this KB Document : https://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html
    Regards,
    Rahul

  • Watermark PDF Action (Offset x,y now working)

    I can create a watermarked PDF just fine, however, Automator freezes when I try to change the x and y offsets. As soon as I put the cursor in the box and try to change the value from 0, Automator will freeze.
    Any workarounds?

    I have played with that myself. Although it does seem to crash when you try to change those values you can still get it to work. For example, if I wanted to change the x offset to 50 I would select the current x offset then type 50. You'll see that when you type 50 it doesn't appear in the field and seems to lock up Automator... but that's OK. What you need to do after typing 50 press command-s on your keyboard to save the workflow, then press command-q to quit automator.
    Now just open the automator workflow again and you will see that 50 is in the x offset field. So although it does appear to lockup, you can still save your change and quit automator. It's not a good solution but it works. You just have to save and quit and re-open the workflow every time you make a change.

  • InDesign Crashes on export of automated generation - PDF

    Hi,
    I'm currently developing script (JS) for automated generating PDFs from templates filled with data from transformed XML.
    I've prepared tagged and styled templates so it should be enough to import xml file and place it in the right way..
    Everything is okay until I try to export PDF. At this point InDesign crashes and nothing is exported. I tested this issue on OSX 10.6.2.; OSX 10.5.8. Win XP. All machines have InDesign from legal CS4 Master Collection with all available updates. All machines have strong enough processor and RAM.
    In case of automated import and manual export from InDesign it works. Automated export fails.
    I enclose log from console:
    12.11.09 12:40:53 com.apple.launchd.peruser.501[121] ([0x0-0x74074].com.adobe.InDesign[2391]) Job appears to have crashed: Segmentation fault
    12.11.09 12:40:53 ReportCrash[2418] Saved crash report for Adobe InDesign CS4[2391] version 6.0.4.578 (6040) to /Users/Virus31/Library/Logs/DiagnosticReports/Adobe InDesign CS4_2009-11-12-124053_ASIANSTAR-3.crash
    And also the script generating PDF
    var myDocument = app.open(File("DocumentTemplate.indd"), true);
    //Set import prefs
    var myXMLImportPreferences = myDocument.xmlImportPreferences;
    myXMLImportPreferences.allowTransform = true;
    myXMLImportPreferences.createLinkToXML = false;
    myXMLImportPreferences.ignoreUnmatchedIncoming = true;
    myXMLImportPreferences.ignoreWhitespace = false;
    myXMLImportPreferences.importCALSTables = false;
    myXMLImportPreferences.importStyle = XMLImportStyles.mergeImport;
    myXMLImportPreferences.importTextIntoTables = false;
    myXMLImportPreferences.importToSelected = true;
    myXMLImportPreferences.removeUnmatchedExisting = false;
    myXMLImportPreferences.repeatTextElements = false;
    //Import and apply data (xml)
    with(myDocument)
    myDocument.importXML(File("Fake-Content.xml"));
    myDocument.xmlElements.item(0).placeXML(pages.item(0).pageItems.itemByName("Page1"));
    //Export and quit
    app.activeDocument.exportFile(ExportFormat.pdfType, File("TestDocument.pdf"),false);
    app.activeDocument.close(SaveOptions.no);
    There are 2 more attached files (archive with source files + crash report) so you can try it on your own. I can't get what I'm doing wrong and I'm getting mad.
    If you ever had this trouble let me know. Thank you.
    Lukas
    Added crashreport.rtf

    Hi
    It may not be relevant, but you have not set a path for the PDF.  Put ~/ before the doc name for the PDF to be created in the top level of your home folder.  Otherwise the PDF will be put inside the actual InDesign app (Right click app, show Package Contents - contents - MacOS)
    This is the case with CS3 anyway.  Not checked on CS4.
    Cheers
    Roy

  • Export to PDF Issue (SSRS 2012 with Integration SharePoint 2013)

    Problem Description: We have an operational report that returns around 43,000 records, based on a stored procedure.  The Stored Procedure itself runs pretty quickly (under ~15 seconds).The report renders in 20 seconds.
    However, we get an error like “Sorry, something went wrong” (see below) approximately 2 minutes after we choose/select the PDF as a rendering extension for export. The download of the .PDF never starts.
    Sorry, something went wrong
    An unexpected error has occurred.
    Technical Details
    Troubleshoot issues with Microsoft SharePoint Foundation.
    Correlation ID: b66ebd9c-adf0-407e-892e-00d1e37c4feb
    Date and Time: 9/29/2014 11:10:20 PM
    The 2 minutes is what I get from the execution log... it is actually 122 seconds for timerendering. As for the rs trace log from the web server, see below...
    "w3wp!library!471!09/29/2014-23:10:20:: e ERROR: Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.OnDemandReportRendering.ReportRenderingException:
    An error occurred during rendering of the report. ---> System.ServiceModel.CommunicationException: The remote host closed the connection. The error code is 0x800704CD. ---> System.Web.HttpException: The remote host closed the connection. The error code
    is 0x800704CD.
       at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
       at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
       at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
       at System.ServiceModel.Channels.BytesReadPositionStream.Write(Byte[] buffer, Int32 offset, Int32 count)
       at System.ServiceModel.Activation.HostedHttpContext.HostedRequestHttpOutput.HostedResponseOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)
       --- End of inner exception stack trace ---
       at System.ServiceModel.Activation.HostedHttpContext.HostedRequestHttpOutput.HostedResponseOutputStream.CheckWrapThrow(Exception e)
       at System.ServiceModel.Activation.HostedHttpContext.HostedRequestHttpOutput.HostedResponseOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)
       at System.IO.BufferedStream.Write(Byte[] array, Int32 offset, Int32 count)
       at System.Xml.XmlStreamNodeWriter.WriteBytes(Byte[] byteBuffer, Int32 byteOffset, Int32 byteCount)
       at System.Xml.XmlBinaryNodeWriter.WriteBase64Text(Byte[] trailBytes, Int32 trailByteCount, Byte[] base64Buffer, Int32 base64Offset, Int32 base64Count)
       at System.Xml.XmlBaseWriter.WriteBase64(Byte[] buffer, Int32 offset, Int32 count)
       at Microsoft.ReportingServices.ServiceRuntime.WcfResponseData.Write(Byte[] buffer, Int32 offset, Int32 count)
       at Microsoft.ReportingServices.ServiceRuntime.WcfResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count)
       at Microsoft.ReportingServices.Library.BufferAndOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)
       at Microsoft.ReportingServices.Library.RSStream.Write(Byte[] buffer, Int32 offset, Int32 count)
       at System.IO.BufferedStream.Write(Byte[] array, Int32 offset, Int32 count)
       at Microsoft.ReportingServices.Rendering.ImageRenderer.PDFWriter.Write(String text)
       at Microsoft.ReportingServices.Rendering.ImageRenderer.PDFWriter.EndPage()
       at Microsoft.ReportingServices.Rendering.ImageRenderer.Renderer.ProcessPage(RPLReport rplReport, Int32 pageNumber, FontCache sharedFontCache, List`1 glyphCache)
       at Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer.Render(Report report, NameValueCollection deviceInfo, Hashtable renderProperties, CreateAndRegisterStream createAndRegisterStream)
       at Microsoft.ReportingServices.Rendering.ImageRenderer.RendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCap
    w3wp!wcfruntime!471!09/29/2014-23:10:20:: e ERROR: Reporting Services fault exception System.ServiceModel.FaultException`1[Microsoft.ReportingServices.ServiceContract.RsExceptionInfo]: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException:
    An error occurred during rendering of the report. ---> System.Exception: For more information about this error navigate to the report server on the local server machine, or enable remote errors (Fault Detail is equal to Microsoft.ReportingServices.ServiceContract.RsExceptionInfo)."
    Things Also Done
    1) I also tried exporting the report through excel and found no issues (it exports successfully and no issue when i open the file). The size of the exported excel (.xlsx) is 4.28MB. The timerendering value for export to excel is approx. 77 seconds.
    2) I also tried creating email subscription (PDF as the rendering format) for that report and it works successfully. The size of the attached PDF from the email is approx. 1.43 MB. I can also open that PDF file with no issue. And the size of the email with
    the attached PDF file is approx. 1.48 MB.
    That all said, we would like to seek for your assistance to determine what is causing the failure of exporting the report to PDF issue directly from the reporting site. (Let me remind you that the email subscription for the same report with attached
    PDF works with no issue)

    Hi roel2000,
    According to your description, you get error when exporting the report into PDF. It works properly when exporting in excel or PDF format within E-mail subscription. Right?
    In Reporting Services, the Excel and MHTML(e-mail subscription) render extensions are soft page break renderers. The PDF render extension is hard page break renderer. It has different render behavior between these two kind of renders. This might cause the
    error. Since we are not clear about your report structure, please refer to rules in the link below and do the troubleshooting.
    Rendering Behaviors (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Automator: render pdf to images

    I am taking a folder of pdf files all named numerically in the order they should be in and rendering them to images using the automator "render pdf to images."
    This outputs the images with completly random names. Even using the "Rename Finder Items" as suggested right after the Render pdf to images still does not produce images in the right order.
    This is really frustrating as I can't even see how this function could be useful for anyone if it can't produce images with some kind of logical file names.
    Does anyone have experience with this?
    Message was edited by: Jessek

    Not sure what the testers of some of these actions were thinking about, but you might try using the Dispense Item Incrementally action to step through your file list one at a time.

  • Automator for PDF merge with variable

    Hi - very new to automator, but now very motivated to find a solution to this annoying problem.
    I have to scan expense receipts each week and upload them 1 by 1 into a client time & expense system. I don't think Automator can help me with this one.
    A second system requires all the expense receipts to be merged into a PDF and a 3rd copy emailed to an approver.
    This is what I would like automator to do:
    From my Expenses folder, where all my individual PDF's are located
    I select all my distinct PDF's for a particular week
    Using an automator service, right click style
    Using 'Ask for Text', I would enter the "Week of"
    My selected PDF's are merged into 1 PDF, with the name = "Week of <VAR>"
    Mail starts (can't figure out how to use Gmail in a browser in Automator)
    Creates a message to the approver guy with the merged attachment from #5 above
    Sends the message
    Quits Mail
    I can get the automator to run without the variables trick...but it really would save a lot of time if I could just key it in once (instead of #filename, #email subject, #body of the message).
    I also tried looking up the UUID for the variable and inserting it into the email body and subject line - but it didn't take.
    Can anyone help with this?
    Many thanks
    bforeste

    Can't help you with automator, but you can create an app with the applescript below that will do what you want.
    Procedure:
    1. Open the Applescript Editor by typing Apples in the spotlight search field and hitting 'return' on your keyboard.
    2. Copy the entire script below and paste it into the Editor window.
    3. Hit 'Command-K' on the keyboard and ensure there are no compiler errors. If there are, please look at the script and see if one part of it was highlighted. Report back what part of the script was highlighted and any error messages.
    If the compile didn't produce an error, then:
    4. Hit 'Command-S' on the keyboard, choose a snazzy name ("PDF merger" or something...) and a location to save it in (your Apps or Desktop folders).  Be sure to change the 'File Format:' to Application at the bottom of the Save screen before hitting 'Save'.
    5. The first time you run the app (you run it by double-clicking on it, like any other App), you'll be asked to put in the details manually. On subsequent runs, it will fill in the defaults for you. I haven't set up the default locations for looking and searching for the files as I'm not sure where they would be on your system. I can do that if you tell me the path from your 'home' or user directory.
    Also note, I've written the script so that it doesn't send the message until you've reviewed it. i.e., you might want to double check you've attached the correct file, or add a message. If you want it to send automatically without review change the following lines near the end of the script:
    change the line 'set visible to true' to 'set visible to false'
    change the line 'save' to 'send'
    property defaultFolder : ""
    property msgSubject : ""
    property theRecipient : ""
    property theWeeklyname : ""
    property outputFile : ""
    getInfo()
    mergePDFS()
    sendMail()
    on getInfo()
              display dialog "Type the recipient's email address: " default answer theRecipient
              set theRecipient to the text returned of the result
              delay 0.25
              display dialog "Set the subject of the message: " default answer msgSubject
              set msgSubject to the text returned of the result
    end getInfo
    on mergePDFS()
              display dialog "Please choose the files to merge…" default button "OK"
              set inputFiles to choose file of type "PDF" with multiple selections allowed without invisibles
              delay 0.25
              display dialog "Please choose a folder to save the merged PDF…" default button "OK"
              set outputFolder to choose folder
              delay 0.25
              display dialog "Type the name of the combined pdf (without the .pdf extension): " default answer theWeeklyname
              set theWeeklyname to text returned of the result
              set outputFile to (outputFolder as text) & theWeeklyname & "(" & (count of inputFiles) & ").pdf"
              set pdfFiles to ""
              repeat with p in inputFiles
                        set pdfFiles to pdfFiles & " " & quoted form of POSIX path of p
              end repeat
              do shell script "/System/Library/Automator/Combine\\ PDF\\ Pages.action/Contents/Resources/join.py " & "-o " & quoted form of POSIX path of outputFile & pdfFiles
              return outputFile as alias
    end mergePDFS
    on sendMail()
              tell application "Finder"
                        set theAttachment to outputFile as alias
              end tell
              tell application "Mail"
                        set newMessage to make new outgoing message with properties {subject:msgSubject, content:"" & return & return}
                        tell newMessage
                                  set visible to true
      make new to recipient at end of to recipients with properties {address:theRecipient}
                                  tell content
      make new attachment with properties {file name:theAttachment} at after the last paragraph
                                  end tell
      save
                        end tell
              end tell
    end sendMail

  • Watermark PDF action

    I am having trouble with the Watermark PDF action. Whenever I attempt to enter anything in the X or Y offset, the program locks up and I have to force quit. Anyone else experienced this?

    same problem here; this is the first time I've ever tried to use the feature, so I have no idea if it ever did work.
    The offset text boxes exhibit the problem. When I tried to reset the angle to 0 using the keyboard, once I typed "0", every key that I pressed added another zero into the box: tab, delete, return...you name it. Grumble.

  • Watermark PDF Documents Service error

    Hello,
    I created a workflow application to watermark PDF's, and now I'm trying to create a service that does the same thing. The workflow works as an application, but the service is getting an error that reads: "The action “Move Finder Items” encountered an error." The service is included below. Please advise how to fix this, thanks!
    Watermark PDF Documents
    Compress Images in PDF Documents (as jpeg)
    Move Finder Items (to desktop, replacing existing files)
    Rename PDF Documents (replace existing files)
    Message was edited by: edawg467

    You're developing an application? Perhaps post here:
    Discussions > Developer Forums > Software Development 101
    http://discussions.apple.com/forum.jspa?forumID=728

  • Automator and pdf

    How (with which logic) does Automator combine pdf 's in one? How can I force a precise sequence of pages of origina pdf 's?
    Thanks

    Photoshop allows you to rearrange the images you want to put in a multipage PDF within the source file selection dialogue box but it is very fussy about what file types you give it - basically they have to be created or saved as PSDs.
    As for Automator, it takes the source files within a folder in alphabetical order, so your best bet is to rename them before creating your multipage PDF.
    However this only works if you offer it a source folder to start with (so use the Get Folder Contents action first). If you bung a load of files at it (even if they are the contents of one folder) it will arrange them in an apparently random fashion.
    If you don't want to move various PDFs into one folder you can get Automator to create a temporary folder on the desktop, copy the various PDFs there, sort and rename them by date created and then pass this folder into the Composite PDF maker. You can also let Automator trash the temp folder once the job is done, or leave it on the desktop in case you want to rename files to get them in the right order and put that folder into the process.
    After creating the composite PDF you can also get Automator to move it to the desktop and rename it (using the Sequential option allows text entry such as New PDF-01) to avoid having to Save As in Preview as somebody suggested in another thread.
    Just today I created workflow for this purpose and saved as a Finder plugin. Now I can right-click any folder of PDFs and create a single composite PDF. As this was only my second ever Automator session I am a little proud and quite excited (though frustrated that I can't create PDFs from other source files).
    Hope this helps.

Maybe you are looking for