Replace pages in a PDF with acrobat

Please help me find a solution for my problem, i believe there are many good Applescript gurus here, i´m not one of them!:)
Basic needs:
i have a pdf coming from a text and picture system and i want it to merge to a templet with buttons and functionality.
same amount of pages to replace every time.
If i do this in Acrobat 8 i just open my template, i go to Document->Replace Pages, selected replace from 1-24 and execute.
Is this possible in applescript? i can se the argument in the Acrobat Library, but i don´t know how!
Please post a solution if you can.
Best regards
Inge

Hello Inge Eidem,
If I'm not much mistaken about your intention, the following script may help.
A few things.
• I'm not sure but you seem to be deleting the template 'ipdfmal.pdf' every time the folder action is triggered and I presume that it's probably not your intention, so I modified the code a bit. (It would now delete the finished source files, that are dropped files in the folder where the folder action is attached, when you enable the corresponding lines which I currently commented out)
• The tempalte file is to be found at templateFdPath and the finished files are to be saved in finishedFdPath.
• The script is NOT tested, for I don't have Acrobat Professional v8.
• You can find some essential documents at Adobe's site:
(See p.161 of 'Interapplication Communication API Reference' for 'save' command syntax and example)
* Acrobat Developer Center : Interapplication communication
http://www.adobe.com/devnet/acrobat/interapplication.html
* Interapplication Communication API Reference
http://www.adobe.com/devnet/acrobat/pdfs/iacapireference.pdf
Good luck,
H
-- SCRIPT
on adding folder items to thefolder after receiving theAddedItems
set rootFdPath to (path to desktop folder from user domain) as string -- # root folder path
set templateFdPath to rootFdPath & "template:" -- # template folder path
set finishedFdPath to rootFdPath & "finished:" -- # finished folder path
set templateName to "ipdfmal.pdf" -- # template file name
set templateFile to (templateFdPath & templateName) as alias
repeat with i from 1 to (count theAddedItems) -- note that theAddedItems is generally a list of aliases
set addedItem to item i of theAddedItems
-- get source file name
try
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {":"}
set addedItemName to last text item of (addedItem as text)
set AppleScript's text item delimiters to oldDelims
on error errs number errn
set AppleScript's text item delimiters to oldDelims -- always guarantee to reset ASTID
error errs number errn
end
tell application "Adobe Acrobat Professional"
-- activate -- avoid this, if possible, in such processes launched in background as in folder action
-- open source
open addedItem
-- open template
open templateFile
-- merge source pages to template
replace pages document templateName over 1 ¬
from document addedItemName starting with 1 number of pages 25
-- close source document
close document addedItemName
-- save merged template as new file named after source file
save document templateName to file (finishedFdPath & addedItemName)
-- close renamed template document
(* in case template document name is set to new name in previous 'save as' *)
close document addedItemName saving no
-- (OR) close template document
(* in case template document name is NOT set to new name in previous 'save as' *)
-- close document templateName saving no
end tell
-- delete each finished source file
-- tell application "Finder" to delete addedItem
end repeat
-- empty trash
-- tell application "Finder" to empty trash
end adding folder items to
-- END OF SCRIPT
  Mac OS 9.1.x  

Similar Messages

  • How do I insert and delete pages from a pdf with acrobat 10X?

    How do I insert and delete pages from a pdf with acrobat 10X?

    Alternatively, be sure your page thumbnails panel is open, and click on the icon highlighted in this image, just under the heading.
    You will see a dropdown with the options you need.

  • Using Replace Pages in accessible PDF's

    Hi - Brand new to this forum.  Hoping someone can help... I have an existing tagged and accessible PDF - needed content update, so did that in Word, created a new tagged and accessible PDF, and used Replace pages to insert the new pages into the existing PDF.  Acrobat Help says when you replace pages in a PDF, Acrobat adds the tags from the incoming pages to the end of the tag tree... and keeps the tags for the replaced pages.   That didn't happen - the tags from the incoming pages are not there and, in fact, the tags that were in the existing PDF are not there anymore either - now it just says "Warning, empty page".   Any ideas?

    Hi kvd,
    I guess my nomenclature may be presumptive. All I should have said is that the most appropriate method I have discovered for retaining tagging and all other accessibility functionality has been the Combine command. Replace Pages sometimes works and most of the time (lately) is doesn’t. My experience with Insert Pages has not been consistently successful either.
    What you mean by a workflow I don’t fully understand. Do you mean an automated action? Unless you consistently use the same page numbers in every document, I don't know how you could automate it. Also, I have not been able to find specific process treatment about combining tagged PDFs. This has been a result of testing and experimentation.
    Let me know if you have any other questions.

  • Replacing pages in accessible PDF's

    Hi - Brand new to this forum.  Hoping someone can help... I have an existing tagged, tested and accessible PDF - needed content update, so did that in Word, created a new tagged, tested and accessible PDF, and used Replace pages to insert the new pages into the existing PDF.  Acrobat Help says when you replace pages in a PDF, Acrobat adds the tags from the incoming pages to the end of the tag tree... and keeps the tags for the replaced pages.   That didn't happen - the tags from the incoming pages are not there and, in fact, the tags that were in the existing PDF are not there anymore either - now it just says "Warning, empty page".   Any ideas?
    Thanks greatly!

    Hi Bill@VT,
    Thanks for your response.  Presently, I have AA Pro XI and Word 2007.  I am confused - it seems the Adobe help material is saying different things - my pages say the new tags will come with the new pages, and your pages say not? 
    I am suspecting some of the problem may be coming from the fact that these documents have been created over many years using various versions of Word and Adobe Acrobat - since I got Pro XI, some pdf's that used to work OK for our people using screen reader technology suddenly don't read correctly anymore.  I need to repair anything not working, and I need to create a new workflow process for myself to create accessible Word documents from the start.   I'm thinking it may be cleaner to just start over and create all brand new Word documents with accessibility, maybe in Word 2010 or 2013, and then run them through Adobe Acrobat "Make Accessible" function and checker. 

  • Problem printing PDF with Acrobat Pro 9.4.4

    Hi!
    I can't correctly print a PDF with Acrobat Pro that was created in Indesign CS5.
    I want to print it on a letter format (8,5 X 11") and it offers me a format of 8,49 X 10,99". It results in having my document being printed as tile with it's original format 12 X 21,5" as if I didn't adjust the format to be reduced.
    I temporary used Preview to print my PDF, but now I can't as the encoding in which I received the PDF used to be "Creo Normalizer JTP" and now it is "Adobe PDF Library 9.9"
    If anyone can help!
    This is my first time here, thanks in advance for your help

    Here's what it looks like (I work in french, hope you can understand)
    I just updated my software, thanks for that!
    Now, my problem is still on... I still have the very same result when I print. I did selected the correct Page Scalling I needed. I did selected the paper size I wanted. I chose Shrink to Printable Area and I tried with Fit to Printable Area.
    Since I've had this problem the size appears as : 8,49 X 10,99 (Instead of 8,5 X 11). I tried with Legal (8,5 X 14) but it appears as 8,49 X 13,99. I went through the preferences, but I can't find anything that could be the problem.
    Any other idea?
    Thanks!!
    Also, Preview was very helpful, as it did print my PDF correctly! I understand it's not the best... but it did the job

  • How to convert large Word 2007 doc (1200 KB) to PDF with Acrobat 9 Standard

    I'm trying to convert a large Word 2007 document to PDF with Acrobat 9 Standard.  It gets as far as 58% and then says it is unable to complete the conversion.  How can I fix this?

    The file you are working on is really not that large. There probably is a problem on a certain page of the document. Break the document in half. Try to create a pdf file from each half. Hopefully, one half prints properly and one-half does not. Take the half that does not break it in half.  Try to convert each half into a pdf, etc...
    Eventually, you will find which page has a problem. Most likely there is a graphic or a font used on that page that has problem. Most likely a graphic. That graphic will need to be recreated.

  • Bulk convert text to PDF with Acrobat

    Hi. When I convert a text file to PDF with Acrobat X Pro the character spacing in the resulting file is incorrect.  The columns of numbers which do correctly line up in the text file, do not line up correctly in the PDF file.  I adjust the settings for the conversion in the CREATE PDF FROM WEB PAGE box and I choose a fixed-width font.   If I use Adobe PDF Converter (the printer driver) the result is perfect.  If I open the text file with Microsoft Word and then convert it to PDF with PDFMaker, it is also perfect. I want to use Acrobat so that I can bulk convert my 300 text files to PDF.   Can you please help as I have tried everything?  Thank you.  Paul Pontikis (Deakin University)

    Thank you for responding LoriAUC.  I have 300 (*.txt) files that I only ever open with Notepad. I don't every open them in a web browser.  I want to bulk convert them to PDF.  The orientation of the resulting PDFs must be landscape.  It appears that the only way to select LANDSCAPE in Acrobat is to adjust the settings in the CREATE PDF FROM WEB PAGE box.  It seems that Acrobat uses its HTML Conversion Engine to convert text files to PDF.  When I do this and then bulk convert them using Bulk Convert Files to PDF, the orientation is correct, that is, landscape instead of the default portrait setting, however the character spacing is imprecise and the columns of data are wavy.
    Message was edited by: paulatdeakin

  • Can't print to pdf with Acrobat 7.1.0 in Vista

    I am unable to print to pdf with Acrobat 7.1.0 in Windows Vista.  I used to be able to, now all of a sudden that functionality is gone.  I haven't knowingly done any upgrades since the last time I successfully printed to pdf, but I do have autoupdates enabled, so I can't say what Microsoft may have been up to recently.  When printing to pdf from Internet Explorer 7, the window simply closes.  A printer icon shows up in the system tray but registers 0 print jobs and soon disappears.  When printing to pdf from Word (2003), Word crashes with a series of message boxes saying something about attempting recovery.  Any suggestions?

    AcroTray is running.  Thanks for asking that question, as this is one thing that I have disabled on computers running XP, since disabling it in XP doesn't adversely affect my limited use of Acrobat in any way.  I have not disabled it with Vista.  I tried printing to file, and that also caused the window to close.  I happened to have a second IE7 window open when attempting to print to file, and it did not close, so it only affects the active window.  I don't know if that helps at all; when a program crashes, I typically observe it take with it all open windows associated with that program, so the fact that this is only closing the active window seems potentially useful to me in my ignorance of what is the root cause. 

  • Please advice on adding 3D-animation files into a PDF with Acrobat Pro DC.

    Hello,
    Where is the button animation in Acrobat Pro DC?
    Can you give me advice on adding 3D-animation files into a PDF with Acrobat Pro DC.
    I have Acrobat PRO DC .
    Thank you.

    Hi George,
    I just tried adding the files as attachments; however I didn't like doing that because it increased the file size of my PDF document quite a bit. 
    I'm not sure if you're familiar with the "Insert Object" command in MS Word, but I want to do the same thing in my PDF document...but the key is, anyone must to be able to open the embedded file from any location.
    I created an MS Word document with several embedded objects.  I was later asked to PDF the Word document, but since embedded MS Word objects do not migrate to the PDF, I am now trying to embed the same files I embedded into my Word document into my PDF document over top of the icon image.  The file types I'm trying to embed include MS Word, Excel, PowerPoint, and Adobe PDF.  Does this make more sense?  I want to create a hyperlink over top the icon image that was PDF'd from the MS Word document which allows any user to click on the link and open the separate file.

  • How do you convert an Autocad drawing into a pdf with Acrobat X Standard?

    How do you convert an Autocad drawing into a pdf with Acrobat X Standard?

    Something to try -
    Having installed Acrobat Standard you have the Adobe PDF virtual printer installed.
    From your authoring application do a "file-print" and select the Adobe PDF printer rather than the attached local or network printer / plotter.
    Be well...

  • Edit a pdf with acrobat X

    I want to make changes to a PDF with Acrobat X

    Opening a PDF in Acrobat X Pro your click-path would be:
    Tools - Content and under "Edit Text & Objects" select the desired tool.
    Be well...

  • I am trying to delete a page from a pdf using Acrobat X Pro but the delete option is greyed out. Why

    I am trying to delete a page from a pdf using Acrobat X Pro but the delete option is greyed out.  Does anyone know why?

    Post your question in the forum for Adobe Acrobat.

  • FF 19 for Mac. changed preferences to open PDFs with Acrobat Reader. Now when I click on a pdf link, an about:blank FF window opens (pdf then opens)

    The change in preferences opens the pdf appropriately with Acrobat Reader, as desired, but before it does, FF opens a brand new blank window (about:blank). How can that action be stopped?

    Yes, I mean the eternal application.
    Ctrl-click does open the dialog, but that does not cause new/blank FF window to show up.....however shift-click opens the new/blank window, then opens another FF window with a "New Tab" heading, then opens the pdf with Acrobat Reader.....
    If open the dialog and select "open in new tab" (open in Acrobat Reader is not an option), a new tab is opened, and the the pdf come up in Reader (without opening a new FF window). In earlier FF, it just opened directly in Reader (or acrobat) without opening a new tab or window.
    Thanks

  • Accessing PDF with Acrobat viewer javabean

    I accessed a PDF Document with the Acrobat Viewer JavaBean and its totally working fine as given in :https://today.java.net/pub/a/today/2005/10/20/accessing-pdf-with-acrobat-viewer-javabean.h tml
    But I also wanted markup/annotations features in the same acrobat viewer. Is there a way to implement these features? The api given above in the link doesn't seem to provide all the updated features of acrobat. Any kind of help is appreciated.
    Thanks !

    Verify if you have the jar containing com/apple/mrj/MRJAboutHandler in your class path.
    It think it's called [MRJToolkitStubs-1.0.jar|http://mirrors.ibiblio.org/pub/mirrors/maven/mrj/jars/MRJToolkitStubs-1.0.jar]

  • 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

Maybe you are looking for

  • ITunes 11.0.2.26 freezes when adding folder to library

    iTunes 11.0.2.26 freezes when adding folder to library. This did not occur with any previous version and is taking place with several different folders. Adding files as a batch wrks fine.

  • Calling all T-SQL users! May TechNet Gurus announced!

    The results for May's TechNet Guru competition have been posted! http://blogs.technet.com/b/wikininjas/archive/2014/01/16/technet-guru-awards-december-2013.aspx Congratulations to all our new Gurus for May! We will be interviewing some of the winners

  • Top N Parameter

    Hello Experts - I'm using the Top N Parameter variable supplied by SAP but its not functioning the way its supposed to. No matter what number I give in the prompt, I get all the rows. Rows: Sold-to party Material Statement Grp Columns: Billed qty Net

  • XI 3.0 to PI 7.0 upgrade

    Hi, One of my client is oing to upgrade from XI 3.0 to PI 7.0 and I need some information regarding this: 1. What are the advantages offered by PI 7.0 over XI 3.0 ? 2. What are the steps involved in such an upgrade esp from XI 's point of view. Also,

  • SCB Indicator mapping

    Dear friends We have one development, where Invoces are paid by wire transfer, in invoice line items - Additional data we have SCB indicator, which we want that needs to be updated in payment document (payment medium file)  at the time of automatic p