Printing PDF attachments with Javascript?

I am very new to Javascript (and not a programmer) so please excuse my basic or un-correct terminology here! I've created an interactive pdf, and have set buttons (with javascript code) to print specific ranges of pages from the document. I've now been asked to have said buttons print attachments (which are also pdf's) in the same style... is this possible, and if so, does anyone have example code? The code that I used to print the page ranges, for example:
print ({nStart: 0, nEnd: 5});
Any assistance/guidance/help would be greatly appreciated!

The document first has to be opened. You can do this via JavaScript with the doc.openDataObject method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.509.html
This method returns a doc object, which you can use with the print method to print the document. You should then use the closeDoc method to close the document, as mentioned in and demonstrated in the documentation linked to above.

Similar Messages

  • Cannot print .pdf attachments in Outlook 2010 on local usb printer using the lastest Adobe Reader

    We can't print pdf attachments from Outlook 2010 on a users local printer via usb with the latest Adobe Reader but it can print to a network copier. We can print from the local printer emails, webpages, regular pdf's on the hard drive.
    Please advise and thanks.

    What is the behavior that you are seeing? Are you getting some error or is it simply failing to print with Reader 10.1.2.
    casper milktoast wrote:
    Update 2-7-12
    When doing a quick print with a right click on the pdf attachment, it will print.
    Also, please let me know that if a simple Right Click > Print operation is working, then what exactly is the operation that is failing.

  • ? Can't print PDF attachments to gmail since installing 11.06

    I am on Windows 7 and Firefox,  Since installing 11.06 I can't print PDF attachments to gmail messages.  I get a (false) message that file cannot be printed, because no pages have been selected.  I tried uninstalling 11.06 and downloading and insatalling it again,  Same result. Any way to download a backlevel version for the time being?  Would appreciate any other sugestions.. 

    Disabling Protected Mode as suggested solved the problem.  It seems to me the impact of Protected Mode should have been highlighted with a warning at the download site.  Alternatively, and in my opinion preferably, Protected Mode enabled should not have been made the default. -shel488

  • Printing PDF attachments

    Hello,
    We seem to have a little bit of uncertainty on our end as to whether you are allowed to print PDF attachments along with your specifications. The doucmentation only specifically mentions printing JPG and GIF attachments, are these the only two allowed filetypes?
    Thanks,
    Drew

    You can print them individually but they aren't included in the single specification pdf. Only JPG and GIF's print inline with your specification print out.

  • Can I batch print PDF files with Adobe Acrobat Reader X

    can I batch print PDF files with Adobe Acrobat Reader X?  I have tried from Windows Exploer (Windows XP) and it looks like the files are opening but they do not print.
    Pat

    Very strange!  What is your installed Reader version?
    Try disabling Protected Mode in Adobe Reader [Edit | Preferences | Security (Enhanced)].

  • Printing pdf/postscript with JPS 1.4 -- HELP!

    Hi all,
    I've been experimenting with the new java printing service and I have run into a couple problems. In particular, I have been trying to get even the most basic example referring to printing a postscript file directly to a printer. The code is pretty much straight from sun's JPS section.
    here's the code:
    // Input the file
    FileInputStream textstream = null;
    try {
    textstream = new FileInputStream("c:/0011.ps");
    } catch (FileNotFoundException ffne) {
    if (textstream == null) {
    return;
    // Set the document type
    DocFlavor myFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
    // Create a Doc
    Doc myDoc = new SimpleDoc(textstream, myFormat, null);
    // Build a set of attributes
    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
    aset.add(new Copies(5));
    //aset.add(MediaSize.A4);
    aset.add(Sides.DUPLEX);
    // discover the printers that can print the format according to the
    // instructions in the attribute set
    PrintService[] services =
    PrintServiceLookup.lookupPrintServices(myFormat, aset);
    // Create a print job from one of the print services
    if (services.length > 0) {
    DocPrintJob job = services[0].createPrintJob();
    try {
    job.print(myDoc, aset);
    } catch (PrintException pe) {
    System.out.println("error");
    Now....I've just installed printer drivers in Windows 2K for a RICOH and CANON iR550 printer. Both printers support PS3 and the RICOH Aficio AP2700 PS printer also supports IPP (Note: I physically don't have these printers, so I'm just printing to a file and viewing the file with a PCL viewer).
    okay...now...the problem at hand....I can do the following with the code above:
    1) I can print a postscript file to the printer with NO attributes specified...once I add Copies and Media types..no services are found...
    2) specifying a PDF docflavor and pdf file will not return any services.
    3) If I specify AUTOSENSE in the docflavor, the PDF will be sent to the printer but 'junk' will be printed out. Basically, the printer doesn't seem to understand the file type.
    I've tried other printer drivers from other printer companies with no success.
    Now, my question to everyone who has SUCCESSFULLY printed PDF/Postscript with the Java Print Service using attributes such as Mediasize, Duplex printing, Copies...please...please respond to this message and provide some insight on how you did it (i.e. printer type, drivers, code snippit, etc...)
    am I missing something?
    I know alot of people having the same problem...
    Thankyou

    Hi,
    You may want to check the DocFlavors that are supported by the printers.
    Using the command as followed,
    // Get the supported flavour
    DocFlavor[] docFlavors = printer.getSupportedDocFlavors();
    for (int i=0; i < docFlavors.length; i++) {
    System.out.println("Supported flavour is " + docFlavors);
    I also hit into the same problem like you, trying to print a PDF into HP LaserJet 5 using AUTOSENSE. Junk output.
    Check the docFlavor supported on the printers are
    Supported flavour is image/gif; class="[B"
    Supported flavour is image/gif; class="java.io.InputStream"
    Supported flavour is image/gif; class="java.net.URL"
    Supported flavour is image/jpeg; class="[B"
    Supported flavour is image/jpeg; class="java.io.InputStream"
    Supported flavour is image/jpeg; class="java.net.URL"
    Supported flavour is image/png; class="[B"
    Supported flavour is image/png; class="java.io.InputStream"
    Supported flavour is image/png; class="java.net.URL"
    Supported flavour is application/x-java-jvm-local-objectref; class="java.awt.print.Pageable"
    Supported flavour is application/x-java-jvm-local-objectref; class="java.awt.print.Printable"
    Supported flavour is application/octet-stream; class="[B"
    Supported flavour is application/octet-stream; class="java.net.URL"
    Supported flavour is application/octet-stream; class="java.io.InputStream"
    However, do not know how to create a print service to support PDF. Obviously, we know that HP LaserJet 5 can print PDF.
    Regards
    Heng

  • Cannot print PDF file with version 11.0.10 Adobe Reader.

    Cannot print PDF file with version 11.0.10 Adobe Reader.  Get error messages "This document could not be printed" and "There are no pages selected to print".  I am using a Mac OS Ver 10.0.2.  I see that this question has been asked by others recently, but no answers.  Anyone have any suggestions?

    Assuming you are running 10.10.2 and not the ancient 10.0.2, can you tell us what printer and printer driver you are using? How is the printer connected to the computer (network, usb)? See if you can delete the Reader preference files? Years ago I resetting the printer subsystem would sometimes cure a problem like this.

  • How to send smartforms as pdf attachments with e mail

    hi experts,
    how to send smartforms as pdf attachments with e mail???
    nitin

    Hi
    In the FORM Interface put proper parameter. Hope this helps.

  • How do I print .pdf documents with reader for windows 8?

    I have Reader for windows 8.  How can I print .pdf documents with it? 

    See FAQ: Printing from Adobe Reader for Windows 8 Tablets.

  • Can not print pdf file with firefox 29.0 pdf preview plugin. Why?

    Can not print pdf file with firefox 29.0 pdf preview plugin. Why?

    Control V doesn't work here for a screenshot.

  • Is there a good way to automate changing existing links to external PDFs to instead be to PDF attachments with same names?

    Greetings!
    Can anyone tell me a good way to automate changing a "main" PDF's existing hyperlinks to external PDFs to instead be links to PDF attachments to the main PDF (the attached PDFs to have the same filenames as the external PDFs) ?
    Format of current link in main PDF:
    Go to a page in another document
    File: C:\\path\filename.pdf
    Destination name: P:1
    When link is manually changed to link to a PDF that has been attached to the main PDF:
    Go to a page in another document
    File: PDF attachment
    Page: 1
    Zoom level: Fit page
    The new PDF link does not list the PDF attachment filename in the link.
    The main PDF (the one that has the links that I would like to automatically change) is generated with the hyperlinks to other PDFs from Adobe FrameMaker 11.  In FrameMaker11, we added special marker text "openpage filename.pdf:1" that is "automatically" changed to be hyperlinks to external PDFs when the main PDF is created (postscript file is processed) by Adobe Acrobat Pro 11.
    My first choice is to be able to change the format of the special marker text in Adobe FrameMaker source file, but I have not found way to specify a link to be to a PDF attachment with a certain filename.
    However, I would also really like the option of running a batch file on a main PDF to change the links there.
    Has anyone tried using that Adobe ExtendScript ToolKit CS6 to do this? That is, a script that could automatically modify the hyperlinks in a PDF to link to PDF attachments rather than external PDFs, or else modify the unprocessed links while they are still in Postscript file format, or else modify the marker text in FrameMaker to instead of creating a link to a PDF in the same directory as the main PDF being processed, to create a link to a PDF attachment files?
    Thank you,
    Judith Wallace
    [email protected]

    FrameMaker's Hypertext feature has no ability to "link" to an attachment on/in a target PDF.
    PDFs sourced from FM can have named destinations set in the FM authoring files such that a link from file01.fm to the specified named destination in file01.fm will be functional in the PDFs created from the FM files.
    Then, of course, there's the dynamics possible by use o FM Books. But that's the grist for the mills at the FM user-2-user forum.
    RE: Scripting - PDF scripting is via Acrobat JavaScript. That something still of and by Adobe although it may migrate to an ISO Standard (or be rolled up in a future ISO 32000).
    So, to the point - look to Acrobat JavaScript for scripting.
    Be well...

  • Since switching from Chrome, I can't print .pdf attachments directly from my gmail. Please help.

    It used to be (in Chrome) that I could view a .pdf attachment in gmail and from there print. Now in Firefox, when I view a .pdf attachment the print option is there and the print dialogue box comes up when I click it, but once I hit "OK" nothing comes out of the printer. I can print emails and other items, so it's not a printer connectivity problem or a problem with the print setup in Firefox. The only items affected are .pdf attachments in my gmail account. I've tried switching .pdf readers and turning off Protected Mode in Adobe. Please help!

    What PDF reader r u use and what version is it?

  • Trouble Printing PDF Attachments in Outlook as "Fit to Printable Area"

    If this has been discussed before, I apologize. I wasn't able to find the exact problem...
    We use Outlook 2007 and Reader X here in my office. When we try to print an email w/ a PDF attachment, the attachment is not printing as "Fit to Printable Area," resulting in very tiny printed PDFs. If we open the PDF on its own, "Fit to Printable Area" is selected by default and the attachment prints as it should. The weird thing is... this is only a problem for some users. For others, the attachments always print as "Fit to Printable Area," even when printed at the same time as the email. Is there some kind of default setting for "Fit to Printable Area" that specifically applies to PDF email attachments? Is there some other reason why this problem only affects some users? Everyone is using Windows XP and we're all going to the same printer.
    Thanks!
    EDIT: Does any one have any ideas on this at all? Thanks again.

    In the past, I have overriden the Print dialog with my own dialog..
    I've called the print function with param5 = true
    http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=001383.html

  • Print PDF Attachments Automatically...???

    Hello All,
    I have an eFax account that emails me a PDF attachment when I get a fax...
    Is there any way that anyone can think of that I print the PDF attachments and automatically when an email comes into that account...??
    For billing purposes, I open and print them all anyway, so maybe some automation will make my day a little easier...
    Thanks for the input...
    Mike

    Make a rule to fire an applescript when you get one of these.
    Have the script save the attachment in a particular folder.
    Give the folder a folder action script which sends the new file to the printer.
    AK
    Saving script (change to suit your folder name):
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">(* save attachments of selected messages
    AK IT Carlow April 2006
    will crash if file already exits
    using terms from application "Mail"
    on perform mail action with messages theMsges
    tell application "Mail"
    repeat with ThisMessage in theMsges
    set Attached to mail attachments of ThisMessage
    repeat with ThisAttach in Attached
    save ThisAttach in "Macintosh HD:Users:austin:Desktop:Test:" & (name of ThisAttach as text)
    end repeat
    end repeat
    end tell
    end perform mail action with messages
    end using terms from
    using terms from application "Mail"
    on run
    tell application "Mail" to set sel to selection
    tell me to perform mail action with messages (sel)
    end run
    end using terms from
    </pre>
    Folder action:
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">on adding folder items to this_folder after receiving these_items
    do shell script "lpr  " & (posixPath (these_items))
    --display dialog (posixPath (these_items))
    end adding folder items to
    </pre>

  • How can I print PDF attachments from ABAP report in transaction ME23N?

    Hi,
    Users attach PDF files using "services for objects" in transaction ME23N.
    How can I print the PDF attachments from ABAP report ?
    Thanks in advance,,

    Hi,
      check this link,this might help you to solve your problem
    /people/thomas.jung3/blog/2005/04/28/setting-up-an-adobe-writer-for-abap-output
    Regards
    Kiran Sure

Maybe you are looking for

  • OS X 10.5.6 CS4 Premiere Pro CONFLICT with VST plugins? Application CRASH

    Hi everybody,<br /><br />just tried to run the trial of premiere cs4. the application crashes on startup without even completing the initialization. instead a bug report comes up while the program scans the installed units / vsts-plugins that are alr

  • Stock not updating after STO?

    There are two plants 5000 and 7000.Plant 5000 transfer material to plant 7000 with STO process. But after STO process stok of plant 7000 is updating (addition) but stok of plant 5000 is not reducing..Both  material document is showing right quantitie

  • Ipod Touch and Skype

    hey there, i'm about to buy the ipod touch (hopefully new one in september) and was wondering if it's possible to use skype with it?!?! greetz KARO

  • Dynamically generating Ok_Code for select option of HUMO t-code

    Hi Gurus , I have used BDC call transaction method in my program to call the HUMO t-code and populating the handling unit in the select option . The ok_code of the select option is written in the program as : PERFORM bdc_field USING 'BDC_OKCODE'     

  • Is it possible to insert a url into a design I have created in Photoshop?

    Is it possible to create an image with multiply links in it or how can I separate my design in Photoshop so that I can assign the links to each element in our email marketing system?