Automated Scripting to create PDF

Ok -- I am new here but I have been using InDesign for several years. I have CS4
(Windows) and the EasyCatalog plugin. I currently create directories using EasyCatalog pulling from a SQL database. I would like to be able to have these directories created daily and placed in a pdf format for users to view. Can this be done with scripting? If I am not being clear, I apologize. I am not sure of the technical terms myself. I know very little programming.

Sounds to me like you would need a scripted solution.
That would be something like this Javascript.
Warning! Very basic; it assumes the index lives in a story of its own, and all numbers in it are page numbers, and all other pages reside in the same document, and page numbering starts at 1. Anything beyond this (documents gathered in a Book, or weird page numbering, or not-every-number-is-a-page-number) complicate stuff. The only sane check is if the number is actually in the page range.
app.findGrepPreferences = null;
app.findGrepPreferences.findWhat = "\\<\\d+\\>";
list = app.selection[0].parent.findGrep();
for (l=0; l<list.length; l++)
     if (list[l].contents > 0 && list[l].contents <= app.activeDocument.pages.length)
          hdest = app.activeDocument.hyperlinkPageDestinations.add (app.activeDocument.pages[list[l].contents-1]);
          hlink = app.activeDocument.hyperlinks.add (app.activeDocument.hyperlinkTextSources.add(list[l]), hdest);
          hlink.name = "#"+l+" to page "+list[l].contents;

Similar Messages

  • Using Automator to Batch Create PDFs

    I've been trying to find a way to make an Automator workflow that will take the name of a folder and combine it's files into a PDF with as little manual input as possible and have finally figured out how to do so. I've seen others ask how to do this for a while so I wanted to share how I did it.
    Why would you want to create PDFs? If you have scanned books, photos, documents or anything else on your Mac, you can create PDFs out of them. You can then store these in iTunes and either read them using Preview on your Mac or iBooks on your iOS device.
    What this workflow will do:
    Take a folder with images, get the folder's name, and create a PDF of the images with it's name.
    On the next pass of the workflow, it will send the previous folder to the trash.
    Create/have a backup of your files!
    Create a folder somewhere that you can drop your folders in. Name it Automator Dropbox. You can create one wherever you want, but this workflow was created with Automator Dropbox in mind so you'll need to change it as necessary.
    Open Automator and create a new workflow.
    Find Finder Items
    - Search Automator Dropbox
    - [All] of the following are true:
    - [Label] is [Red]
    This will search for any folders that were done before.
    Move Finder Items to Trash
    This will move the previous folder/files to the trash.
    Ask for Finder Items
    - Prompt: [Choose a Folder]
    - Start at: Automator Dropbox
    - Type: [Folders]
    This will ask you to choose the next item to convert to PDF.
    Set Value of Variable
    - Variable: pdfvariable
    This will take the name of the folder you just selected and use it to to rename your PDF.
    Label Finder Items
    - [Red]
    This will mark the folder you're working on for deletion the next time the workflow is ran.
    Get Folder Contents
    This will grab all the image files within the folder so that it can create a PDF out of them.
    Scale Images
    - To size (pixels): 1600
    This will scale the maximum dimension of your image down (or up) to 1600px. I find this to be the sweet spot for performance on the iPad 3, and it looks just fine. If the maximum dimension of your image is lower than 1600px, I'd create a duplicate workflow of this and leave out this step; otherwise you will be upscaling and your image won't look as good. You can also leave this step out if you want your original image size kept, but on the iPad 3 and below there will be a delay going from page to page.
    New PDF From Images
    - Save Output to: [Desktop]
    - Output File Name: tempname
    This will save your finalized PDF to the Desktop. You can change this to whatever you want; I would suggest the Automatically Add to iTunes folder located in [Music > iTunes > iTunes Media > Automatically Add to iTunes]. You will find your PDF in the Books category in iTunes.
    Rename Finder Items
    - [Replace Text]
    - Find: tempname in [Full Name]. Ignore Case checked.
    - Replace: [pdfvariable] (Drag pdfvariable from the variables window into the text field for "Replace". If you don't see the variables, go to "View > Variables."
    You can't just drag the variable into the PDF name field in the step above, so this extra step is necessary. It will rename your PDF with the name of the folder it was created from. It will also add the full file path, which will be taken care of in the next step.
    Rename Finder Items
    - [Replace Text]
    - Find: Users/yourname/Documents/Automator Dropbox in [Full Name]. Ignore Case checked.
    - Replace: LEAVE EMPTY
    This will delete the name of the path from the name of your PDF. If your working folder is not Documents/Automator Dropbox, change it to whatever that is.
    If you're running this workflow on a bunch of folders, you can simply keep your cursor over the workflow's play button and press the right arrow + enter to select the next item in queue. This workflow was made for using a little human interaction as possible, so if anyone has suggestions on how to improve on it please post below.
    One last thing - if you're seeing a red folder when you run the workflow to choose a folder, it's because spotlight hasn't indexed it yet and the workflow could not find it to delete it. Just go on to the next item.

    Someone (not me) has created an automator workflow that does this, using a shell script that runs the "pstopdf" unix command. I just downloaded it and tested it on 10 .eps files. You will need to edit the first automator action in the workflow to find the eps files you want (by default it looks for all eps files on your computer), but once you do that, it works like a charm! Converted my eps files to pdf's. Of course, once they are pdf files, you can use automator to convert them to whatever format you want.
    http://mad-sci.blogspot.com/2007/12/why-i-hate-computers.html
    (link to the actual zip file containing the workflow below)
    http://www.physics.mcgill.ca/~burkes/code/PDFworkflows.zip

  • Running report in concurrent manager using unix shell script to create PDF

    Hi,
    I need help urgently, we are in the process of migrating from 10.7 to 11i. My problem is we have a report created in 10.7 that is ran through concurrent manager using shell scripts(host) and the output is stored as .pdf, in 10.7, it works perfectly. Now I am also doing it in 11i but it gives some error. The shell script from 10.7 is: r25runm module=$XXX_TOP/srw/test.rdf \
    userid=$1 batch=yes \
    desformat=pdf destype=file \
    desname=$XXX_TOP/outbound/test.pdf
    I change the shell script in 11i as follows:
    ar60runb report=$XXX_TOP/reports/US/test.rdf \
    userid=$1 batch=yes \
    desformat=pdf destype=file \
    desname=$XXX_TOP/outbound/test.pdf
    I checked your metalink, and I am confused which is the right executable I should use, is it ar60runb or ar60run or rwrun60b or rwrun60c or rwrun60b, which is which? how many parameters do I have to include?, some documents are saying I have to use the 4 parameters-orauser/pwd, userid,username, request_id, others one.Which parameter/s go/es with what executable. We are using HP-UX server 64 bit. In 11i, when I run in concurrent manager it gives me an error:The executable file /chdev/fd11/u00/fd11appl/xxx/1.0/bin/test for this concurrent program cannot be executed.
    Contact your system administrator or support representative. Verify that the execution path to the executable file is co.
    I have checked Metalink and follow the directions, created a link fndcpesr, check and set the permissions, etc. Play around with the executables ar60runb or rwrun60 etc., the parameters. The ar60* or rwrun60* executable permissions are -rwxr-xr-x and $XXX_TOP/fnd/../fndcpesr is -rwxr-xr-x. Also, why is ar60* executables located in $FND_TOP/bin, whereas rwrun60* executables are in $ORACLE_HOME/bin? Please help, I need an answer urgently ,I have to complete this task before Tuesday 9/16/2003 for our migration deadline. Thank you very much.

    I have already fixed the problem, TY anyway

  • Script to create PDF Portfolios

    Hi,
    I was wondering if any body has a script to combine files in PDF portfolios ??
    Thanks
    Trang

    I have already fixed the problem, TY anyway

  • Create PDF from two files in sub folder automation

    I am looking to create an automation tool that does the following to help save time (the current process takes about 20 min):
    First, take two specific files (The first page is a single worksheet excel file that is fitted to one page.  The second is a word document.)  in a user defined location and combine them into one document.  Currently this is done manually through Acrobat 8 via the Create PDF function for each file then the Combine PDF function.
    Second, I would like to have the Bookmark and Attachment pane set for initial view, but there is not a preset option for this.  Is this even possible?  Currently, I set the initial view to bookmarks and page, and include a not one the first page on how to open the attachment pane.
    Third, all external links to documents, via hyperlinks, are added as attachements and the links are changed to point to the attachment so that all information is contained within one document.
    Lastly, this newly created document is posted to an intranet location.
    Any help in part or whole would be great.
    NOTE:  All code must be included as an add-in to Acrobat as this is within a corporate environment and server side scripts are not allowed.

    I have created the following script as a start to trying to figure this out, but I am getting unexpected results.  When I run this script, I get the two files, Temp and Combined.  The Temp file is, as expected, a pdf version of the last file in the array, but the Combined file is where the problem is.  With the Combined file, I have one blank page, then my single worksheet from the workbook, and then only the first page of the word document which is 26 pages.  Any idea what I am doing wrong?
    In addition, is there a way to prompt the user to select the filepath through a Windows Explorer interface?
    Current code:
    var filepath = "/c/filepath/"
    // Create a new PDF document for Profile:
    doc = app.newDoc();
    doc.saveAs({ cPath: filepath + "Temp.pdf" });
    doc.closeDoc(true);
    doc = app.openDoc({cPath: filepath + "Temp.pdf" })
    // List of files of different extensions
    aFiles = new Array( "Doc1.xls", "Doc1.doc");
    for ( var i=0; i < aFiles.length; i++) {
    // Open and convert the document
    newDoc = app.openDoc({
    oDoc: doc,
    cPath: aFiles[i],
    bUseConv: true
    // Save the new PDF file to a temp folder
    newDoc.saveAs({ cPath: filepath + "Combined.pdf" });
    // Close it without notice
    newDoc.closeDoc(true);
    // Now insert that PDF file just saved to the end of the first document
    doc.insertPages ({
    nPage: doc.numPages-1,
    cPath: filepath + "Combined.pdf",
    nStart: 0

  • Initialize Script in Adobe Pro created PDF

    Hello All,
    I have created a PDF from Adobe professional 9. I want to run a script when the PDF loads, how can we do that. I don't see a event at Form level, though there are limited events supported for text Field objects but they also don't have init script event.
    I don't wnat to use XFA form using Livecycle.
    Please help, need answer soon.
    Thanks
    Manoj

    Hi,
    sorry for asking stupid question
    where do I put document script in adobe pro?
    Date: Thu, 27 Aug 2009 09:35:02 -0600
    From: [email protected]
    To: [email protected]
    Subject: Initialize Script in Adobe Pro created PDF
    Just put the code directly in a document script. Any code in the document script (that is not a function) will execute on opening the document (assuming that Javascript has not been disabled on the user's end).
    >

  • Creating ABAP function module in using an automated script

    I wish to create very simple ABAP function modules through an automated script. Is there any way I can do this?

    [http://code.google.com/p/saplink/]
    Greetings,
    Blag.

  • Trigger automator script when new file created

    I want to create an automator script that will recognise when a new file is created (with a name that matches a particular pattern and in a certain directory) and mail that file to a predefined address. Is that possible?

    yes, this is possible with a folder action. you can attach a folder action to the folder in question. it will watch this folder for new files and trigger when a new file is added. you can create an automator workflow and save it as a folder action plugin.

  • Automator Script - How to Batch Convert PDF files to max 200x200px JPG Files

    I have tried several different Automator scripts and can't seem to get it right.
    Each day I have 25 different PDF files. I need to convert the first page of each PDF file to a max width and height of 200x200px jpg file (not jpeg).
    In automator, how do you do a batch convert of the first page of PDF files to a max width and height of 200x200 JPG files?
    Thanks!

    Try
    GraphicsMagick.

  • How to create pdf and html usin oracle policy automation with steps.

    Hi,
    I tried to create pdf report.But they have some problem for while creating xslt.
    Pls provide more steps or simple example creating xslt and which xml use for that also.

    Below is a working (OPA 10.1) example, which I found earlier in this forum. You can call it from a document control on the summary screen. The xml is provided by the server containing all attributes with a public name.
    <?xml version="1.0" encoding="iso-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:fo="http://www.w3.org/1999/XSL/Format"
                    xmlns:fn="http://www.w3.org/2005/xpath-functions">
    <xsl:output method="xml" indent="yes" encoding="utf-8"/>
    <xsl:template match="/">
    <fo:root>
      <fo:layout-master-set>
        <fo:simple-page-master master-name="my-page">
          <fo:region-body margin="1in"/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="my-page">
        <fo:flow flow-name="xsl-region-body">
          <fo:block margin-top=".5cm" margin-left=".1cm" border-start-style="solid">
            <xsl:apply-templates mode="dump" select="/session"/>
          </fo:block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
    </xsl:template>
    <xsl:template match="*" mode="dump" priority="100">
                <fo:block margin-top=".5cm" margin-left=".1cm" border-start-style="solid">
                    Node:
                    <xsl:value-of select="name()"/>
                    <xsl:if test="count(@*) &gt; 0">
                        <fo:block margin-left="1cm">
                            Attributes:
                            <xsl:for-each select="@*">
                                <fo:block><xsl:value-of select="name()"/>=<xsl:value-of select="."/></fo:block>
                            </xsl:for-each>
                        </fo:block>
                    </xsl:if>
                    <xsl:if test="string-length(normalize-space(text())) > 0">
                        <fo:block>Text Value: "<xsl:value-of select="text()"/>"</fo:block>
                    </xsl:if>
                    <xsl:apply-templates mode="dump" select="*"/>
                </fo:block>
        </xsl:template>
    </xsl:stylesheet>

  • Automation Server cannot create object_error in Java script

    Hi
    I am using window.open method to save contents of xml file in my local pc.
    I am getting this error (Automation Server cannot create object),for this,i need to change internet settings.
    But i dont want to change the internet settings as other pages are getting affected.
    Please guide me regarding this....

    Javascript is not Java.

  • Action Playback option changes the Result of an Automated Script.

    When using the Playback Option in the Actions menu, then the  Results are different with different Acceleration methods.
    So the Result is different with, Accelerated - Step by Step - Pauze for [1],
    I Expierence the issue with Windows and Mac as well.
    This happens with Illustrator CS5 (15.0.1)
    # Workflow
         Creating the action:
         Open Illustrator, open the attached document: 4102107 Exact.pdf
         Create an New Action, enable Transform window
         Select the Black Square and the Red text Exact
         Go to Object, Scale > 33.3% and press Copy.
         Then go to Transform an from the upper corner and enter on the
         x=397,13 pt y=212,25 pt
         You see the Image moved to the correct clip.
         Open the Document in Illustrator,
         Go to Actions > Select the created action >Now go to the Panel Menu from Actions > Select Playback option.
         You get a new Dialog where you can select a different acceleration mode: "Step by Step" - "Accelrated" - "Pause for [Numeric] Seconds"
         So the issue is, when you select here a different accelration the result is different.
    >Is this as Designed? If So, why because when i understand the function of an automated script. It should exactly get the same
    result as programmed, why else would you want to use the script if the result with be different without nothing.
    There is running an Escalation case about this, But hopefully anybody more experienced can comment me about this. Or inform wheter  it's a bug?
    Please help me in this. (thank you in advance!)

    To make a few things clear I have created a Video of the issue.
    Have a look on:
    http://adobesupport.emea.acrobat.com/p65456795/
    Maybe i really blow in explaining what exactly happens, but i'll try it again.
    When creating an action (as shown in the Video) You can see that the result
    is totally different and when creating the action. This is error 1.
    - I recieved a respons that we just shouldn't use the Transform Panel. So i requested to know why there is a panel created, if we cannot use it.
    No respons.
    Then when you select a Playback option in the setting of the Actions Panel,
    the Result differs. As you can see when executig in the Accelerated the Movement gets placed WAY out of the file.
    When selection Step by Step or Pause for [Numeric] Seconds, then the result is that the movement gets placed
    at the bottom of the file. Both of the Results don't even come close in the Action which is created.
    Hopefully this will calrify what i ment.

  • Error Message when creating PDF

    I was trying to Create PDF - From File and access a Pages document when I received this error message.
    There was an error opening this document.  There was a Macintosh system error (-1409). 
    Any ideas?  I'm new to Acrobat and did this same function two days ago.  Now it doesn't work.  I can open a Jpeg into Create PDF, but not a Pages document. 
    It's MAC OSX software.
    Thanks.

    You can't directly open a Pages  (or Word) document and Excel and, its equivelent  Macintosh program  in Acrobat. That's true. In OSX.5.8 and lower and 9.2 and lower you can go to print menu and choose AdobePDF and print a PDF. Or simply use the Mac's PDF button in Print menu. Or Most programs will allow you to save as Post script by going through the print menu click on PDF button and choose create Postscript from PDF (I know it sounds stupid but that what Apple has it listed as. ) Then Drop the PS File on Distiller. or open with distiller.
    ON OSX.6.x (Snow Leopard) all bets are off.
    you need to read this link.
    Note: to make sure that everything goes smooth locate Automator select, do get info (Command key-I) and change from 64 bit to 32 bit. Its seems based on info from Acrobat the automator action for Create adobe quality PDF Automator action

  • Writing commands to get specific data channels in the output report via script or automated script generation..

    In my project I have to make certain calculation and then get the data plotted in the given report template. I am using automated script for this. My script is doing all the calculations and then it not selecting and drag-dropping the selected channels on the report template. Its saving the blank report template.
    I am struggling to get the data for specific channels plotted by using the script. I need the selected channels to be plotted on this report template and then get it saved.
    Any help will be deeply appreciated. Thanks
    Solved!
    Go to Solution.

    Hi LaxG,
    Brad is absolute right. It is possible to create your whole layout via script.
    If you have loaded  the example report layout you can copy these lines to create a new line in your plot. This is the recommended object oriented way.
    call Report.Sheets("Blatt 1").Objects("2D-Axis1").Curves2D.Add(e2DShapeLine, "anyName")
    Report.Sheets("Blatt 1").Objects("2D-Axis1").Curves2D.Item("anyName").Shape.XChannel.Reference               = "[1]/Zeit"
    Report.Sheets("Blatt 1").Objects("2D-Axis1").Curves2D.Item("anyName").Shape.YChannel.Reference               = "[1]/Geschwindigkeit"
    For performance reasons it's recommended to use the it like this.
    dim oLine
    set oLine = Report.Sheets("Blatt 1").Objects("2D-Axis1").Curves2D.Item("anyName").Shape
    oLine.XChannel.Reference               = "[1]/Zeit"
    oLine.YChannel.Reference               = "[1]/Geschwindigkeit"
    Like Brad mentioned it is much easier, that you have a stored template of your report with all setings and customisations already done.
    You open this layout file and have stored the names of your calculated channels. When you are doing this with a script they always have the same name and belong to the same group.
    Now you can customize the references of the line items.
    Kind Regards,
    Philipp K.
    AE | NI Germany

  • Creating pdf report from xml publisher report

    Hi,
    I'm newbie to xmlpublisher env.
    We've a report in Oracle 11i developed in unix shell script and run as concurrent program generating check details which will be printed on checks.
    I was asked to migrate this report into R12 in pdf format.They provided rtf template and xml data.I installed xml publisher desktop.I would like to know how I can create pdf template,if necessary changing the position of fields on the template.
    Thanks,
    Kiran

    Hi Kiran,
    Sorry to say, but no you can not use the desktop or standalone edition for integration with EBS.
    In your case there are 2 alternatives for you:
    1) Update the Unix shell script so it's ok for R12 (it did a good job for a long time on 11i)
    2) Leave the unix script and redesign for BI Publisher (ebs edition)
    Both are taking the same effort in my opinion, only since you moved to R12 it's a good learning moment to get to know the strength of BIP.
    Since you task is to modify the standard Oracle solution, which i guess is an rtf template provided download the MS Word plugin and adjust the template
    If any detail help needed please contact me directly

Maybe you are looking for

  • When I bookmark a web page it now goes into favorites and not bookmark. How can I get it back to bookmark?

    When I bookmark a web page now it goes in favorites, not the bookmark section. I don't know why thisvis happening but I want to get back to the bookmarks. Ehat can I do?

  • Calling  Report in   Customized Method   Created in  ZBUS2081

    Hi , I have created ZBUS2081  in that I  have  create one Customized  method  ZEMAIL  . now  in SE38   i have  wriiten  logic  to send  email to  person   . I want to use  this  report in ZEMIL   method   .   even I  used that  report  by  using   SU

  • Need help intalling Classic in 10.4

    I have an old version of Photoshop and am trying to run in classic mode. When I go to the Apple support page it gives me directions on how to download from my Tiger CD, but guess what - no where on the CD is classic mentioned. I have the Mac OS X Tig

  • Critic error 1603

    Hi all I tried to install the latest version of Skype today. During installation process, it always pops up a message "Could not open key HKEY_LOCAL_MACHINE32\Software\Microsoft\Internet Explorer\Main\Feature Control\FEATURE_MAXCONNECTIONSPERSERVER.

  • Is Logitech G5 Laser Mouse Compatible with Mac mini?

    I am thinking of getting a Mac mini. I currently have a Logitech G5 laser mouse which I hope to keeping using after I get my mac mini. Does anyone know if G5 works well with Mac mini? Are there any known issues? Thanks. Message was edited by: fboy