Replace cover page of PDF with applescript in Acrobat

I tried replacing a cover page in a PDF document with the following code but got a "doesn’t understand the replace pages message." What am I not getting here? I'd like to fill a folder with new covers and have them wind up replacing the covers of PDF files, or page 1 with covers that have the same file name. This is my starting point.
tell application "Adobe Acrobat Pro"
set docPgToBe_replaced to "Macintosh HD:Users:don_feldman:Desktop:Switch_Chapter_ Covers:chapter PDF:9780071714921.pdf"
set SourceOfNewPage to "Macintosh HD:Users:don_feldman:Desktop:Switch_Chapter_ Covers:cover PDF:9780071714921.pdf"
replace pages docPgToBe_replaced over 1 from SourceOfNewPage starting with 1 number of pages 1
save docPgToBe_replaced
end tell

The initial view setting is the responsibility of the document author - if they have defined one you cannot override it.
There's an option to set a default pagination and zoom for when the PDF itself has no preference, but it makes no sense for that to allow for cover pages as Acrobat has no idea if one exists or not.

Similar Messages

  • How to export the Apex web page to PDF with click of a button?

    How to export the Apex web page to PDF with click of a button?
    Am looking at exporting the Form view on APEX to be exported to PDF.

    In order to get a PDF, you need to generate a Report....in PDF format.
    If you are using the APEX Listener, you can initiate the download of the PDF by calling APEX_UTILS.download_print_document()  (I normally place this in a Process)
    BUT -- You have to create the Report (under Shared Components) and a Template (also under Shared Components).
    The white paper in my first post gives you the HOWTO "[Create] Custom PDF Reports with Oracle Application Express and the APEX Listener".
    Start by creating a Report (in Shared Components, bottom right) that uses a simple SQL statement like:
    Select * from emp where empno = :P15_EMPNO
    You may need to hard code the parameter before you hit "Download XML" button.
    The XML that you get from clicking "Download XML" satisfies the "Step 1 - Create an XML Data Source" found on Page 11 of the document.
    The rest of the instructions is in that whitepaper.
    MK

  • Webinar: "Multimedia in PDFs with FM-to-Acrobat TimeSavers + Multimedia Asst" (Feb 10)

    "Multimedia in PDFs with FM-to-Acrobat TimeSavers + Multimedia
    Assistant" Webinar: Tuesday, February 10, 2009 (10am-11am PST)
    Learn how you can embed/link to audio or video files (filmed or
    software demos) from PDFs created in FM, without the tedious work
    of inserting the link/file and defining playback properties every
    time the PDF is updated.
    With Multimedia Assistant, you use hypertext markers to define
    access (embed or link) to local/web-based multimedia files in all
    formats supported by Acrobat/Reader, so that the defined features
    are automatically present in the PDF file.
    [Feature demos: http://www.microtype.com/ShowcaseMultimedia.html ]
    Applicable for FrameMaker/Windows (all versions)
    To register to this free one-hour webinar, please write to
    [email protected]
    Shlomo Perets
    MicroType * http://www.microtype.com
    FrameMaker training/consulting * FM-to-Acrobat TimeSavers/Assistants

    I have learned that there may be an issue with upgrading to 7.0.7, selecting the "reboot later" option, and then trying to use Acrobat with 3D. The suggested procedure is to do the update and then select "reboot now" when asked. Upon rebooting your system, the correct plug-ins are copied into the running Acrobat directories and things should work properly. We will continue to investigate these types of issues with the updater, but I believe this procedure will help fix these types of problems.
    Michael Kaplan
    Director of Engineering, Acrobat 3D/Manufacturing

  • Can not add function to pages-document created with Applescript

    If I create new document using the GUI (New document) I can place the cursor within any table-cell, type "=" (equal sign) and f.e. "2+2" which will result in a cell showing a "4".
    If I create a document with Applescript, I can not add new functions (neither by typing = nor by using Insert >> Function (may be different, I have German version here). Already existing functions (which already were in the template) can still be used and work as expected but can not be altered.
    Any idea?
    I use Pages '08, Version 3.03
    Code I used to create the document:
    tell application "Pages"
    launch
    make new document at front with properties {template name:templateName}
    # Angebotsnummer ins Dokument schreiben
    tell body text of front document
    make new paragraph at after paragraph 1 with data angebotsNr
    set paragraph style of paragraph 2 to "Überschrift"
    end tell
    # Datei abspeichern
    set dateiName to missing value
    repeat until dateiName is not equal to missing value
    set dateiName to text returned of (display dialog "Datei Name:" default answer angebotsNr & "_" & kundenName) as text
    end repeat
    save front document in angebotsOrdner & dateiName
    end tell

    I apologize but the given script can't run.
    The variable templateName is undefined.
    The variable angebotsNr is undefined too.
    About the described behavior, it's a bug which I never discover before.
    It's always striking in Pages '09.
    Here is the report which I filed :
    Bug ID# 8704270
    Summary:
    +Odd behavior of tables in Pages documents created by a script+
    +Steps to Reproduce:+
    +Run this huge script+
    +tell application "Pages"+
    +make new document at front with properties {template name:"Blank"} (* "Vierge" on French systems *)+
    +end tell+
    +Insert a table+
    +try to insert a formula+
    +Expected Results:+
    +I assumed that I will get the formula editor which I get when the document is created by hand+
    +Actual Results:+
    +There is no way to get the editor, no way to insert the equal character.+
    +This odd behavior strike in all versions of Pages '09 and Pages '08+
    Regression:
    +None to my knowledge+
    Yvan KOENIG (VALLAURIS, France) dimanche 28 novembre 2010 11:30:29

  • Possible to scan a document into Acrobat XPro,then replace part of that PDF with text or image file?

    Hi everyone,
    Is it possible first to  scan a paper document into Acrobat X Pro, and then to replace a "pane" or box within that PDF with a text or image file?
    Would it require  SDK and Javascript?
    Thanks,
    Rick Weinhaus

    CtDave and others:
    Here's the problem in more detail.
    I am a physician and I already have the ability to incorporate paper-based
    documents into an electronic health record (EHR) by scanning them and
    saving them as PDFs.  The documents are paper patient encounter forms with
    a different box or 'pane' for each category of data.   Each box has a fixed
    location on the paper form.
    There are three situations, however, where I want to have the option to
    overwrite certain boxes of the PDF with data generated by methods other
    than scanning.
    1) Insert text macros with variable fields using the electronic health
    record's software.
    2) Insert a drawing available as a pre-existing JPG or generated by using a
    tablet.
    3) Insert text generated using Dragon Naturally Speaking.
    For efficient office workflow, in all three cases the text or image to be
    inserted into the box or 'pane' in the PDF needs to be generated while I am
    still seeing the patient -- that is -- before the paper form has been
    scanned and converted to a PDF.
    The sticky note tool is one option, but I would want to be able to modify
    the default size of the sticky note so that it corresponded exactly to the
    size of the box it was 'overwriting.'  I can't figure out how to do this?
    Could it be done using scripting?
    Furthermore, I would want the sticky notes to automatically display when
    the PDF was opened, so that a hover would close rather than open them.  This
    sticky note method would have the advantage of allowing the user to toggle
    back and forth between inserted data and any original handwritten text.
    Any thoughts?
    Rick

  • Script for scanning  and converting  cover page of PDF to JPEG

    Hi we are building an application that would allow the upload of PDFs. We want to be able to scan and convert the cover page to jpeg for display purposes.
    Does anyone know whether there is a ready made script to do this?

    This would require a plug-in so that you could access the AVConversion methods. Unfortunately since Acrobat is not licensed for server use you would not be allowed to have this plug-in as part of an automated workflow on a server accepting uploads.

  • How to batch convert .pages to .pdf  with automator & applescript

    Hi all,
    As the title states, I want to drag and drop one (or a whole stack) of .pages documents onto an automator app, and have it pump out .pdfs...
    Here is my code, it crashes with an error, but I'm really new to this so I don't really know what's going wrong.
    on run {input, parameters}
      tell application "Finder"
      repeat with aFile in input
      if class of (item aFile) is not folder then
      set {tName, fileExt} to {name, name extension} of aFile
      if fileExt is not missing value and fileExt is not "" then
      set tName to "PDFs/" & (text 1 thru -((count fileExt) + 2) of tName) & ".pdf"
      tell (get container of aFile)
      if not (exists folder "PDFs") then make new folder at it with properties {name:"PDFs"}
      tell application "Pages"
      set mydoc to open file aFile -- open input file in Pages
      export mydoc to file tName as PDF --do the exporting
      close mydoc saving no -- close the original file without saving
      end tell
      end tell
      end if
      end if
      end repeat
      end tell
    end run

    mirror318 wrote:
    One more thing, is it easy to change that script so that the output is put in a subfolder called "PDFs" (the folder would go in wherever the .pages file was)?
    This should save to a subfolder called "PDFs" in the Folder where the pages file is located:
    on open fs
      my proceed:fs
    end open
    on proceed:fs
      tell application "Finder"
      repeat with i from 1 to (get count of items in fs)
      if (name extension of item i of fs) is "pages" then
      --set PDFfile to text 1 thru -7 of (item i of fs as text) & ".pdf"
      set PDFfile to name of (item i of fs)
      set PDFfile to text 1 thru -7 of PDFfile & ".pdf"
      if not (exists (parent of (item i of fs) as text) & "PDFs") then
      make new folder at (parent of (item i of fs)) with properties {name:"PDFs"}
      end if
      set PDFfile to (parent of (item i of fs) as text) & "PDFs:" & PDFfile as text
      tell application "Pages"
      set mydoc to open (item i of fs) -- open input file in Pages 
      export mydoc to file PDFfile as PDF --do the exporting 
      close mydoc saving no -- close the original file without saving 
      end tell
      end if
      end repeat
      end tell
    end proceed:

  • Line spacing (leading) when converting web page to PDF with Acrobat Pro 8.1.2

    I recently upgraded from Acrobat Pro version 7.0.9 to version 8.1.2 (Windows XP Pro). In many cases, when I "Convert current web page to an Adobe PDF file" using the Adobe PDF toolbar in Internet Explorer, the spacing between lines is much larger with version 8 than it was with version 7. Has anyone else observed this? Is there any way to control leading?
    Peter

    Is the plugig the same as an add-on because all of my Acrobat Add-ons are active?
    Name                Adobe PDF
    Publisher           Adobe Systems, Incorporated
    Status              Enabled
    Load time           0.25 s
    Name                Adobe PDF Reader Link Helper
    Publisher           Adobe Systems, Incorporated
    Status              Enabled
    Load time           0.01 s
    Navigation time     0.00 s
    Name                Adobe PDF Conversion Toolbar Helper
    Publisher           Adobe Systems, Incorporated
    Status              Enabled
    Load time           0.06 s
    Navigation time     0.00 s
    Name                Adobe PDF
    Publisher           Adobe Systems, Incorporated
    Status              Enabled
    Load time           0.00 s

  • Is there an easy way to create 2 page imposed PDFs with a background?

    I have figured out a way to create a suitable imposed single page PDF using the 'import as layer' action, the action only understands a single paged background PDF.
    In other words, I have a PDF that has the suitable marks on it with the pages marked 'Page 1' & 'Page 2'. This is the background PDF.
    I open this PDF in Acrobat and run the action that places another PDF (the 'Source' PDF) on multiple layers with different offsets.
    The original (template) PDF is 2 pages & the Source PDF for imposition is 2 pages, and even though the 'import as layer' understands that the source PDF being imposed is 2 pages, it does not seem to allow the original (template) PDF to be seen as 2 pages.
    There is a 'Target page number' option in the Preview area, but that is grayed out at 1.
    So...other than commercial applications, is there an easy way to build a 2 page PDF imposition file??
    Maybe a script?

    Sabian,
    Yes, the Quite software would be perfect, especially the 'Hot'. Tested & works great for us, but the price tag for the 'Hot' is rather steep for our relatively simple process......background template with a 'step & repeat' of the 'live' document.
    As I mentioned in the original post, to do this with a single page PDF is simple enough using an action that places the 'live' doc multiple times, but the vast majority of our publications are 2 pages.
    Currently runing the action twice for each job. I would save a bit of time if this could be automated to do both sides with one action, or one script.

  • Replacing a page in PDF doc

    I have a 5 pg PDF open in Reader. I need to replace one of the pages. Can I / how do I do this? Do I need Acrobat? Thx!

    You can't do it in Reader, but you can do it in Acrobat if the document doesn't have security restrictions.

  • Export Tables from Pages to Numbers with AppleScript?

    I've hit a stumbling block while trying to use AppleScript to remove a table from pages and paste it into Numbers.
    I've found no way to directly identify the table in the document to copy for pasting into Numbers and I've been unable to remove the other information from the document to isolate the table for a select all command.
    The easiest thing I can think of is a AppleScript to remove the first set of characters before the table or to explicitly extract tables only from the document.
    I've tried all manners of AppleScripts and I can't seem to get it to work. None of the AppleScript text selection commands work to remove the information other than the table.

    Try selecting the whole of the contents of the document and then running:
    tell app "Pages"
    selection
    end tell
    This will return a list of the selected objects, amongst which you should see something like: table 1 of body text of document id 15373020 of application "Pages"
    With that data you should be able to select just that item:
    select table 1 of body text of document id 15373020 of application "Pages"
    Obviously that's just an example. If you were scripting this, you would most likely work through the list filtering only those objects you want to work with - the tables in this case.

  • Print web page to PDF with date as file name

    Hi
    I'm doing environmental monitoring for a construction project and i need to download the 5 day forecast from a particular web site daily. I'd like to automate this to happen at 7 am every day. I've tried record but am having problems.
    Here are the steps i'd like it to take:
    1. Open book mark in Safari
    2. Open print dialog (command p)
    3. Open save to PDF
    4. Select folder in finder
    5. Enter current date as file name
    6. Save pdf file.
    I've tried Get Specified URL and nothing happens. When i record the mouse always misses.
    Help

    Hi... had to put this up for a while as I got busy in my day job. Here's where i'm at
    I can successfully generate a PDF file but it's blank. The other two problems I'm having is that I'd like to name the file with the current date. I can call up the current date using that tool but i can't figure out how to make it the file name whether i print to pdf or use the tool.
    I think there's something i'm missing here.
    Message was edited by: Gary Springs

  • Archiving entourage emails as pdf with applescript

    Hello, I would like to archive all my emails in a flexible format that doesnt need entourage to read them. I would like to save all my emails in entourage to PDF. does anyone have a script that can do this? I can do this individaully by just selecting 'print' on each email and the selecting save as PDF but this is very time consuming!!! smile
    I would also like to find a script that can save all my attachments on my emails in entourage to a folder!
    Can anyone help!!!
    Thank you for your time
    Kindest Regards
    Carl

    While PDF is cross-platform, I'm not quite sure how "flexible" it is.
    I would suggest you do use Entourage's format because it is flexible. By this I mean that if you drag a message out of the Entourage window onto your Desktop then the file that it creates is in .mbox format. This format is an Internet standard (see Wikipedia for more information http://en.wikipedia.org/wiki/Mbox).
    If you really want to stick with a "flexible" file format, consider plain text or maybe RTF. Most any text editor such as MS Word, TextEdit or BBEdit will still be able to open these files in the future.
    Hope this helps! bill
    1 GHz Powerbook G4   Mac OS X (10.4.5)  

  • Archiveing entourage emails as pdf with applescript

    Hello, I would like to archive all my emails in a flexible format that doesnt need entourage to read them. I would like to save all my emails in entourage to PDF. does anyone have a script that can do this? I can do this individaully by just selecting 'print' on each email and the selecting save as PDF but this is very time consuming!!! smile
    I would also like to find a script that can save all my attachments on my emails in entourage to a folder!
    Can anyone help!!!
    Thank you for your time
    Kindest Regards
    Carl

    While PDF is cross-platform, I'm not quite sure how "flexible" it is.
    I would suggest you do use Entourage's format because it is flexible. By this I mean that if you drag a message out of the Entourage window onto your Desktop then the file that it creates is in .mbox format. This format is an Internet standard (see Wikipedia for more information http://en.wikipedia.org/wiki/Mbox).
    If you really want to stick with a "flexible" file format, consider plain text or maybe RTF. Most any text editor such as MS Word, TextEdit or BBEdit will still be able to open these files in the future.
    Hope this helps! bill
    1 GHz Powerbook G4   Mac OS X (10.4.5)  

  • I open Firefox and Google a question. When I find what I think is going to help me, I click on it and all I get is an empty page - no pdf with my answer. Just a blank window.

    When I open the firefox application and fill Google in with a question, I get several options. When I click on the option I want, all I get is an empty window. Why can't I access information?

    Is this a problem with all Google search results or only links that directly open PDFs?
    I can't recall whether Firefox 3.5 had the applications tab here:
    Firefox > Preferences
    If it does, try searching for PDF and see whether related content types have become associated with the wrong application.

Maybe you are looking for

  • ZCM 11 Group Policies not applying to satellite servers

    Hi there We are running 2 Windows 2012 Primary Servers and a SQL 2012 Database server at our main site, all remote sites have SLES11 SP2/OES11 SP1 as satellite servers. We upgraded all servers last weekend to 11.3.1 and now have an issue with Group P

  • Why certain functionality works in Adobe Acrobat, but not in LiveCycle Preview PDF?

    I have some simple logic in a LiveCycle form that will hide a subform when I click a checkbox.  When I save as dynamic PDF and open in Adobe Acrobat 9, it works fine, but when I test the .xdp in LiveCycle Preview PDF it does not.  I'm new to JavaScri

  • Automatic Credit note through condition type

    Dear Experts How can i generate a Credit note automatically, after i post my invoice. I wish to create this credit note to settle the payments of the Broker's and commision agent, who had brought the business to my orgnisation Regards Sudhir

  • How to create Database, table , and apply triiger on oracle10g lite ?

    Hello All, I want to use oracle 10g lite , i just download oracle 10g lite from oracle site and just install on my system, i have no any knowledge how to create database, how to create tables and how to apply triggers on tables. I want to access this

  • Interactive Reporting & Importing a CSV file

    I have an Oracle table that I'm connected to via IR. I then imported a CSV file into the IR document. Is there a way to join the Oracle table and the CSV file so that I can then run queries from them?