Combine PDFs (Error on using scripting guide snippet)

Hi all,
First of all, all apologizes if this topic has been discussed yet. I have looked in the archives without success.
However feel free to give me the link if I missed it.
Ok,
I am trying to execute this snippet from the scripting guide. But there is no way I can get it working on the console:
// Create a new PDF document:
var newDoc = app.newDoc();
// Insert doc1.pdf:
newDoc.insertPages({
nPage : -1,
cPath : "/C/doc1.pdf"
// Insert doc2.pdf:
newDoc.insertPages({
nPage : newDoc.numPages,
cPath : "/C/doc2.pdf"
// Save the new document:
newDoc.saveAs({
"/C/myNewDoc.pdf");
// Close the new document without notifying the user:
newDoc.closeDoc(true);
newDoc is not defined
1:Console:Exec
newDoc is not defined
1:Console:Exec
undefined
What do I do wrong ?
TIA Loic

// Create a new PDF document:
var newDoc = app.newDoc();
// Insert doc1.pdf
returns undefined
// Create a new PDF document:
var newDoc = app.newDoc();
// Insert doc1.pdf:
newDoc.insertPages({
nPage : -1,
cPath : "/C/doc1.pdf"
returns
syntax error
1:Console:Exec
undefined
syntax error
1:Console:Exec
undefined
Hope it helps
Loic

Similar Messages

  • Combining PDFs into one using c# and acobat x

    Hi
    How can i combine multiple PDFs into one using Acrobat X, but control it all through c#
    Thanks

    A user will have the application open on their machine.  The application scans relevant folders looking for the documents, and when it finds all the ones it needs it needs to open them and compuile them into one PDF.  They are Hyperion reports.  The human --> Acrobat needs to go, as the trigger is the files being present.
    It is a windows form application in C# that will sit in the tray, just doing what it needs to when it needs to.
    Not on a server, as one employee needs to check when done and scan for a sense check on the compiled report.
    Hope this helps.

  • PO PDF errors when using custom RTF Template, but works with custom xsl

    Hi,
    I have done following set up steps for PO PDF
    Setup / Organizations / Purchasing Options / Control TAB / set 'PO Output Format' = 'PDF'
    setup / purchasing / document types / select "Standard Purchase Order" / Set the Document Type Layout to your new template.
    But with the RTF template the PO Output for communication completes with error. However when I use custom XSL-FO style sheet, it works.
    Can anyone help me how I can make my RTF work? When click on the preview of the template, it shows the PDF output though. Am I missing any other set up steps? Your help is greatly appreciated.
    Thanks,
    Sharmila

    I think the only way to have control over the html output is to enclose the tags or any information within a borderless table and align the text and table as necessary...
    Thanks,
    Bipuser

  • Keynote unexpected error while using rulers/guides

    Hi all,
    I just bought Keynote '09 because I was frustrated with Powerpoint and wanted to run a presentation on my iPad (bought the iOS version, too, but this issue pertains to the Mac OS version).
    I imported a .pptx file that was working okay in Powerpoint, but I wanted to fine-tune the leading, so I selected "Show Rulers" and "Show Guides" from the View menu. As soon as I clicked on a ruler, I got an error message, "An unexpected error has occurred. Please quit and reopen Keynote."
    This happened a few times. Sometimes, I could actually get a guide to work, but when I tried to place another guide, I would get the same error.
    These appear to be the offending lines in Console:
    1/24/13 7:49:26.296 AM Keynote[23136]: -[__NSSetI addObject:]: unrecognized selector sent to instance 0x906f3a0
    1/24/13 7:49:26.297 AM Keynote[23136]: Exception caught by top level: NSInvalidArgumentException : -[__NSSetI addObject:]: unrecognized selector sent to instance 0x906f3a0
    Any ideas? There are workarounds, such as using palettes to help align text from slide to slide, but this is a basic page layout feature that should work!
    Hardware is an early 2011 MBP 15" 2.3GHz i7 running ML 10.8.2.
    Thanks!

    I want to add that I also got the same error with almost the same info in the console:
    8/12/13 1:25:21.903 PM Keynote[2810]: -[__NSSetI addObject:]: unrecognized selector sent to instance 0x9013eb0
    8/12/13 1:25:21.904 PM Keynote[2810]: Exception caught by top level: NSInvalidArgumentException : -[__NSSetI addObject:]: unrecognized selector sent to instance 0x9013eb0
    I'm editing a regular Keynote presentation and I drag a guide from the ruler.  Then I get the An unexpected error has occurred. Please quit and reopen Keynote. message.  I can still use Keynote without closing out.  When I re-open the presentation I dragged the guide into, the guide dissapears.
    I tried duplicating the error with a number of different Keynote presentations both local and on iCloud.  Same thing.
    Keynote '09 version 5.3 (1170)
    MacBook Pro retina display OS X version 10.8.4
    Thanks!

  • Need to custom combine PDF - use a script?

    I would like to make various booklets from a folder containing many pdfs.  If I use a script, the script would have to read an input file and arrange the order and the output bound pdfs.  I would also like to run the script from within a portfolio, is that possible?
    TIA
    j

    I'm not sure what you mean by running the script from a portfolio, but I've
    created a script that reads a text file with file paths and then combines
    those paths into a new file. See here:
    http://try67.blogspot.com/2009/10/combine-pdf-files-from-text-list.html

  • 2Sided Original 1Sided ADF Scanner -Combine PDF Pages -  Data Error?

    I just purchased a scanner with an Auto Document Feeder, ADF, of 25 pages after trying to use it I found out through the company that it only scans one side. I have another ADF scanner where the software allows the user to flip the pages over and then reinserts them for the final PDF file. Instead of spending more on a double sided scanner I figured I would create a program using Automator.
    The script I created worked a few times but after some tweaking it stopped.
    The problem is just before the Combine PDF Pages where I have two "Get Value of Variables" which I set as PDF Documents at the beginning of the script.
    The log reads before and at the point of error;
    Conversion from Files/Folders (com.apple.applescript.alias-object) to PDF files com.apple.applescript.alias-object.pdf) completed.
    . ! The action "Combine PDF Pages" was not supplied with the required data.
    The variables are showing the entire path to include the filename and extention of my selected PDFs, but the log above the error seems to change the variable to the appropriately desired object.
    ? What I need to do to correct this error because it seemed to work earlier by using variables?
    The script would be useful for any type of ADF scanner that outputs one-sided to PDFs and the originals are two-sided.
    Your help is appreciated.
    KGz
    Message was edited by: KGz

    Red
    I have been working in Automator for this program and saved it as an Applescript plug-in for the Scripts Menu. I don't have to have it as a script I just need it to work.
    The pecular thing was while testing the program in Automator before exporting it to the plug-in the program was skitish meaning that at first it didn't work then I added 'view results' and then afterwards it seemed to work. After this I removed 'view results' and it worked then I exported it but since then I can't get it to work again even after reinserting 'view results'.

  • Why do vector lines appear different in my Photoshop document compared to the PDF that was created using "Scripts Layer Comps to PDF"? And how do I get them to look the same?

    Why do vector lines appear different in my Photoshop document compared to the PDF that was created using "Scripts > Layer Comps to PDF"? And how do I get them to look the same?

    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Combine PDF-files using Indesign?

    Hi,
    Is it possible to combine, lets say 15, PDF-files using Indesign and some scripting magic?
    I know it's easily done in Acrobat Pro, but I'd like to skip that step and make it even easier for my colleagues.
    Any hints, tips or links are much appreciated.
    Thanks,
    Thomas

    All you have to do in Acrobat is drag one file after another onto the same window, correct? Then save?
    You can combine PDF files with InDesign, but then you'd get an InDesign file, so you have to export as a new PDF again. Sure, a script can do that for you, but it still sounds like it would take more time, and *definitely* not as easy as the straightforward drag-drop-save steps in Acrobat Pro.

  • Java scripting for header,footer and combine PDF as package

    Hi All,
    1.How to add header and footer using scripting.
    2.How can i combine 5 pdf files in to one pdf as PDF file package using Java Scripting.
    Thanks
    Mohamed Idris

    Hi Lenonard,
    Thanks for your reply, I am refering JavaScript for Acrobat API Reference, Version 8 document , but i could not find the right syntax for the above task.
    I am sucessfull writing script for page label but not for insertion of page number in the footer section.
    Regarding combining PDF files i could merge file and it comes as single PDF file not like assembeling pdf files as package.
    Please let me know the syntax and if i am looking at not right documentation, please let me know the document name to refer.
    Thanks again.
    Mohamed Idris

  • Error when using matplotlib in exectuing Python script

    Hi Team,
    I was trying to use matplotlib in the execute python module.
    It gives the following error. It is related to PyQT
    Error 0085: The following error occurred during script evaluation, please view the output log for more information:
     ---------- Start of error message from Python interpreter ----------
     data:text/plain,Caught exception while executing function: Traceback (most recent call last):
       File "C:\server\invokepy.py", line 160, in batch
         mod = import_module(moduleName)
       File "C:\pyhome\lib\importlib\__init__.py", line 37, in import_module
         __import__(name)
       File "C:\temp\azuremod.py", line 22, in <module>
         import matplotlib.pyplot as plt
       File "C:\pyhome\lib\site-packages\matplotlib\pyplot.py", line 98, in <module>
         _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
       File "C:\pyhome\lib\site-packages\matplotlib\backends\__init__.py", line 28, in pylab_setup
         globals(),locals(),[backend_name],0)
       File "C:\pyhome\lib\site-packages\matplotlib\backends\backend_qt4agg.py", line 13, in <module>
         from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
       File "C:\pyhome\lib\site-packages\matplotlib\backends\backend_qt4.py", line 25, in <module>
         from qt4_compat import QtCore, QtGui, _getSaveFileName, __version__
       File "C:\pyhome\lib\site-packages\matplotlib\backends\qt4_compat.py", line 56, in <module>
         from PyQt4 import QtCore, QtGui
     ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
     ---------- End of error message from Python  interpreter  ----------
    Best regards
    Jagan

    Hey Jagan,
    Could you please configure matplotlib to use the agg backend:
    import matplotlib
    matplotlib.use("agg")
    Then import pyplot?
    Thanks,
    AK

  • Facing issue in PDF print on using Guided Navigation Link on dashboard

    Hi,
    I am facing one issue on using Guided Navigation Link on dashboard.
    I have created one Guided Nav. Link on dashboard and renamed it as "RAW DATA".
    It was working fine.It is coming as RAW DATA link and when I am clicking on the link it is drilling down.
    Till now it is working fine and good.
    But in Printer friendly option of dashboard when I am selecting PDF option( To save it as PDF) it was showing text "Guided Nav Link 1" instead of "RAW DATA" in the downloaded pdf.
    Please give me some solution.
    Thanks in Advance
    Santanu Manna

    Try this:
    1) Drag Guid. Nav. Link to dashboard in a new section.
    2) Click on properties of the Guid. Nav. Link object.
    3) For the source request, click on browse and navigate to the report.
    4) In the Link Properties, check the "Use Dashboard Oject name as link object" checkbox and click "OK."
    5) Click on the Rename button of the Guid. Nav. Link object.
    6) Type in the name you wish to appear in the link and click "OK."
    When you click on Print>PDF, the name of the link will appear in the pdf instead of "Guid. Nav Link 1."

  • I have Windows 7, with Office 10, Acrobat Adobe 9 Std. I used to be able to combine pdf files into one pdf until I converted to Office 10. Now when I combine 3 pdf files into one pdf, I am missing the middle pdf. Pages are there but the pages are blank. A

    I have Windows 7, with Office 10, Acrobat Adobe 9 Std. I used to be able to combine pdf files into one pdf until I converted to Office 10. Now when I combine 3 pdf files into one pdf, I am missing the middle pdf. Pages are there but the pages are blank. Any Idea???

    [discussion moved to Creating, Editing & Exporting PDFs forum]

  • When combining PDF's, the author is picked up from the first PDF opened.  How can I make it use a new author when combining several documents?

    When combining PDF's, the author is picked up from the first PDF opened.  How can I make it use a new author when combining several documents?

    Make sure that fast web view is enabled.

  • On a Mac ios10.10, using online service Export PDF, error message appears,"An error occurred while trying to access service."

    Can you advise steps I might take now?  On a Mac ios10.10, using online service Export PDF, error message appears,"An error occurred while trying to access service."

    Hi Ringdoc,
    Please see this document: "Error occurred when trying to access this service" when logging on to Acrobat.com
    Let us know how it goes!
    Best,
    Sara

  • Hello, i've win7 64bit and can use my adobe acrobat 7.0.0.2004121400. but it is not possible to print a pdf - error 20225 at the installation of acrobat. any ideas how to solve this problem? I've tryed some instructions from internet concerning this 20225

    hello, i've win7 64bit and can use my adobe acrobat 7.0.0.2004121400. but it is not possible to print a pdf - error 20225 at the installation of acrobat. any ideas how to solve this problem? I've tryed some instructions from internet concerning this 20225 error, but without success. thanks a lot and best regards

    BS heißt "Bull___****". *lol* "Betriebssystem" heißt imemr noch "operating system". GoLive wirste wohl gar nicht zum laufen kriegen. ohnehin würde man es nicht mehr verwenden, weil es noch nicht mal CSS2 voll unterstützt geschweige denn HTML 5 und andere moderne Webstandards. Wenn überhaupt, dann findeste vielleicht noch 'ne OEM CD von Strato oder 1und1 bei eBay. Die haben das damals mit jedem neuen Hostingvertrag rausgehauen. Aber wie gesagt, es ist den Aufwand nicht wert. Illustrator sollte sich durchaus installieren lassen. Eventuell einfach nochmal die Installer im Win XP Kompatibilitätsmodus laufen lassen...
    Mylenium

Maybe you are looking for

  • How can I read the active (plugged in) DAQs and then send that to the device name input on DAQ assist?

    I have a system property node for daqmx but it does not let me change it to read when i right click on it. I am trying to have my program detect the name of the daq that is plugged in to the PC and then send that to daq assistant so that it will run

  • Purchase requisitions to schedule lines conversion

    hi, Is there a way to mass convert purchase requisitions to schedule lines directly? The material for this scenario would have a scheduling agreement and source list defined but i am unable to use ME59 to do this. All the indicators for auto PO have

  • Unable to attach a file to the email

    I am trying to attach a file using mail.app. When I click on attach(paper clip icon) then I am unable to traverse down to a sub-directory and to a file, instead mail.app attach the entire directory as an attachment. Is this a limitation with OS X? Ag

  • Replacement earbuds question

    When I get my replacement earbuds, will they be in the factory packaging or no package. Stupid question I know

  • PDF button link path missing

    Hi. I made a button in the pdf file with a link to a file I have on a network. If I copy the main file to a different location I loose the path to the attached file. How can I avoid having this problem? thanks