Button - Print an external PDF file

Hi all... I am trying to have a Button on my PDF to be able to PRINT and external PDF file from off of my site.
any thoughts?
Many thanks.,
Dave

Hi,
use the pakage javax.print
FileInputStream psStream;
try {
psStream = new FileInputStream("file.ps");
} catch (FileNotFoundException ffne) {
if (psStream == null) {
return;
DocFlavor psInFormat = DocFlavor.INPUT_STREAM.PDF;
Doc myDoc = new SimpleDoc(psStream, psInFormat, null);
PrintRequestAttributeSet aset =
     new HashPrintRequestAttributeSet();
aset.add(new Copies(5));
aset.add(MediaSize.A4);
aset.add(Sides.DUPLEX);
PrintService[] services =
PrintServiceLookup.lookupPrintServices(psInFormat, aset);
if (services.length > 0) {
DocPrintJob job = services[0].createPrintJob();
try {
     job.print(myDoc, aset);
} catch (PrintException pe) {}
Thanks,
Snigdha Sivadas

Similar Messages

  • Create a Print button to Print a specific PDF File

    Hi,
    Need help with scripting. I'm creating a Menu Page where in I list the PDF files and right beside it put a PRINT BUTTON which of course will print that specific PDF file. Is this doable or not?
    Thanks.
    VicZam

    For more information on the print method, see: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.511.html
    Note the nStart and nEnd parameters in particular.

  • Opening an external PDF file

    I am using an application called PdfName.exe to open an
    external PDF file, this application just runs and opens the file. I
    configure this app correctly and put it on an fscommand folder and
    when I double click it it open the file I need. However when I try
    to open it with a button on my Flash presentation using the
    following ActionScript
    on (release) {
    fscommand ("exec", "PdfName.EXE");
    it fails, it opens the application just fine but it can't
    find the PDF anymore, which btw is in an external folder to
    fscommand (i also tried inside fscommand\)
    any ideas?
    any other way to open the PDF?

    http://jstart.flashjester.com
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. - www.flashjester.com
    "This has been one of the most impressive and thoroughly
    pleasant
    experiences of customer support I have ever come across -
    astounding!"
    Director - hedgeapple

  • Used to be able to print multiple page pdf files on my HP 7310 all in one and then it stopped and would only print the curent page. This is tedious for long PDF docs. I am on 10.6.8 .

    Used to be ablert to print multiple page pdf files on my HP 7310 all in one printer and now I can only print the current page and therefore it takes forever printing them one by one. I am in version 10.6.8. Tried printing as image using the advanced click and that did not work either.  I have Adobe 9.0 reader installed.

    I tried this earlier, and I tried it again today.  Both times it said "Software Missing!"  and "HP Software required to connect to your printer over the network could not be found on this computer."  But when I tried to install the software (AIO_CDB_Net_Full_Win_WW_130_141.exe, which I downloaded from HP's web site), it wouldn't install, as described above.  In the diagnostic utility, I clicked "skip", and it said "Connection Verified!", and "The printer is connected to the network and the services related to the network connections have been verified and reset to a normal operating state.  Everything appears to work fine at this point.  Please doa test print to verify that the issue is resolved or click Skip to move to the next step."  I clickedthe "Test Print" button, and immediately it popped up a box that said "Test Print Failed."
    I tried again to install the HP software, and it installed, detected the printer, and asked me to select it.  I selected the printer, clicked "next", and it did its network diagnostics.  Then it said "Problem(s) found with your network" and "Problem(s) may exist with the network functions of your printer . . ."  I continued the installation without connecting to the printer.  Then I ran your network printer diagnostic tool again, and got the same result - "HP Software required to connect to youir printer over the network could not be found on this computer."

  • Will not print anything but Pdf files!

    If I try to print anything at all other than a PDF file from Adobe only(other readers will not even work) very little of the page prints if anything at all. For example, I was trying to print a shipping label off of the website, and the only thing that would print was the barcode. Nothing else. I actually had to convert it to a pdf file and open it with Adobe, and then it printed perfectly. I have tried reinstalling, restarting, using the HP support doctor, which says absolutely nothing is wrong with my printer. I am at a loss to why it will only print pdf files from Adobe. Can anyone please help me?! I forgot to mention it worked perfectly about a month ago. We don't print a whole lot and didn't notice it was messed up until just a few days ago.

    Hey , Welcome to the HP Support Forums!
    I understand that when printing from your Windows 8.1 computer to your HP Deskjet 1512 All-in-One Printer, nothing is printing, except Adobe PDF files. I would like to assist you today with resolving this issue. Now, you indicate in your post that you had tried to print a shipping label from a website, and only the barcode prints. However, if you open the file up and print it from Adobe it appears to print fine. This leads me to believe that the actual issue that is occuring is a print system issue with the black cartridge. I know it may come as a surprise to hear that as Adobe is printing fine. However, when you print from certain programs on your computer the file is sent to the printer as an 'image' file. If your printer 'thinks' it is printing an image it will use a mixture of colour ink and black to print the black document. Therefore, what you may actually be seeing when you print from Adobe is colour ink mixed. To start troubleshooting I am going to have you print a Quality Diagnostics Report from your printer and this will help us to isolate this printing issue. Please follow the steps below.  How to Print a Quality Report: Load clean, white U.S. Letter or A4 paper in the input tray, if necessary.Press and hold the Power button. While holding down the Power button, press and hold the Cancel button. Hold them both down for 2 or 3 seconds.The test page prints. (1) Printed with the tri-colour cartridge(2) Printed with the black cartridge  If this Report prints perfectly: Then the printing issue that you're experiencing is not being caused by your products print system. Rather, there may be a driver conflict occuring between your Windows computer and your printer. Please do not proceed with troubleshooting at this time.  If this Report prints with missing black or other quality issues: Then the printing issue that you're experiencing is being caused by your products print system. To resolve this hardware issue can I please have you click here. Once the support document opens please choose the Windows 8 dropdown. Next, follow the steps under Solution one, Solution five, Solution six, and Solution seven. This includes any sub steps under the listed Solutions to complete. Once troubleshooting has been completed please print another Quality Diagnostics Report to confirm if the issue has been resolved. Please respond to this post with the result of printing the Quality Diagnostics Report. I look forward to hearing from you!

  • Captivate published Swf to open an external PDF file

    Hi all,
    I need help to open an external PDF file from the swf file.
    I used this previously. But realised that I can only open the pdf file from the published html file but not the swf file.
    function onClick() {
    window.open("mypdf.pdf");
    onClick();
    Can anyone tell me what is wrong as i am not very good with javascript.
    Thanks.

    Lilybiri is correct that you should be able to use the Open URL or File action.
    But I also just tested your JS code on my own PC here in Captivate (triggered by a button set to Execute Javascript) and it worked fine.
    If you are testing this locally on your PC hard drive, have you made sure that the publish folder location is set up as a trusted location in your Flash Global Security settings?  It might not be working for that reason. 
    You can also try uploading your SWF and PDF file to a web server and testing from there.  Flash Global Security doesn't tend to bother content from a web server.

  • Printing an External PDF

    I have a highly graphical PDF with a PRINT button on it. I want to be able to have it print an external PDF from our site that is a simple Black and White version.
    Looking for some help to do this...
    Many thanks!
    Dave

    Printer control from within a PDF? Not possible unless you use Javascript and even this can be restricted or is very likely completely deactivated in the PDF viewer.

  • [Applet]Printing issue with pdf files on Xerox 4595

    Greetings !!
    I'm trying to print to a Xerox 4595 printer from a Windows XP station (limited account) using a Java Web Applet.
    This applet generates pdf files which have to be printed.
    The Xerox 4595 uses a printing queue that is detected by the Applet.
    The problem is the following: usually when printing a simple local file from this computer there is a box that asks you your login to let you create a job and then print.
    When using the Java Applet, there is no way to have this print box displayed. We have the Java Print Dialog but once clicked on "Print" there is no box displayed to pass the login to the printer and let us print.
    Is anyone already worked with Xerox 4595 and experienced such issue ?
    How can I, using the Java language and modify the Applet, ask the printer to send me the dialog box asking for the login ? Without this login no jobs are accepted and we can't print the generated pdf files.
    I looked on the printer queue settings and it seems that the Xerox uses the IPP to communicate with the local computers in the office.
    The server from which the Applet is used is a openSuSE Linux Web server (apache2)
    How come using Linux workstations any pdf files are printed (on shared printers such HP laserjet) and under windows there is jammed characters and sheet feed instead ?

    A lot can depend upon which app your are using on your tablet device, the same applies to computer programs but apps are much worse.
    Which app are you using?
    I would try the free Adobe Mobile Reader. This product seems to support more features than other apps.
    There could even be issues with the type of tablet you are using. The Apple line may work better then Android devices since there is QA check and approval by Apple.
    Another factor is the how the PDF was created.
    How well are the maps displayed on your laptop or desktop? Try different values of zoom.

  • Word v.X no longer printing or creating PDF files (specific to one user)

    As of yesterday I cannot print from Word (v.X 10.0) documents or create PDF files from Word documents.
    I can print by logging out and using a test user ID.
    I can print after a safe restart (which disables many functions).
    I am still able to print and create PDF files from Pages, Firefox and other programs.
    When attempting to create a PDF from a Word file through the Print dialog box, then saving as PDF, I can see the "magnifying glass" image for the PDF briefly on the desktop, then it disappears.
    Apple Care Phone Support refuses to deal with Microsoft issues (even though it appears to be a print command failing within Mac OS steps of the process, and/or a Mac OS-generated and sorted plist file corrupting the process).
    Microsoft no longer supports the software (i.e., any file you are now using ending in .doc is no longer supported).
    Has anyone had a similar problem or an idea about what to do with likely culprit files?

    Sounds like a M$ problem to me.
    Can you save an Excel file as a PDF?
    There are .plist files in user>library>preferences
    that control the last used settings in apps.
    Quit the office app.
    Trash the com.microsoft.word.plist first.
    If that doesn't work trash the com.microsoft.office.plist
    PS What does yesterday have to do with PDFs not working?
    Something change?

  • Opening external pdf file from director

    i'm a newby to director - is there an easy way to open an
    external pdf file from director. just need it to open in another
    window
    cheers s

    simon way wrote:
    > i'm a newby to director - is there an easy way to open
    an external pdf file from director. just need it to open in another
    window
    > cheers s
    Hi Simon,
    This is very much a FAQ. I have an answer to it at:
    http://www.fbe.unsw.edu.au/learning/director/resources/FAQ/pdf.asp
    As Sean suggested, it's worth searching the group as often
    questions have been covered before, and in this case, many times
    before.
    You can use Google to search through forums at:
    http://groups.google.com/advanced_group_search
    Or simply from the Adobe site at:
    http://www.adobe.com/cfusion/webforums/forum/search.cfm
    regards
    Dean
    Director Lecturer / Consultant
    http://www.fbe.unsw.edu.au/learning/director
    http://www.multimediacreative.com.au

  • Why does a mail-merge in MS Publisher split into multiple files when printed as a pdf file?

    Why does a mail-merge in MS Publisher split into multiple files when printed as a pdf file?

    'Cuz that's what mail merges do.  They create multiple documents based on the parent doc and all the names/addresses in your data tables.
    Perhaps if you describe exactly what you're trying to do & why you need PDF, we can point you to relevant tutorials.
    Nancy O.

  • Embed an external PDF file into the XML

    Dear All,
    We have a program which creates the XML file on the Application server when we execute it.
    My requirement is to Embed an external PDF file into the XML file while generating it through
    program from SAP.
    Please let me know how this is possible.
    Thanks & Regards,
    Vinit

    Yes, you can do it. You have to use an absolute path and add it not only to the folder but to the .manifest
    I wrote a blog post explaining how to do it:
    http://www.captivatecrazy.blogspot.com/#!http://captivatecrazy.blogspot.com/2012/03/embed- pdf-in-captivate-for-lms.html

  • Printer filter to PDF file

    Hello everyone,
    I wonder how to set up a printer filter to pdf file on JDS/Linux?
    E.g OpenSuse 10 comes ready preconfigured with a printer filter to pdf file.
    Not sure if it may be Ghostscript that is used for this setup.
    Has any of you set up such a filter for JDS/Linux?
    Terje J. Hanssen

    A follow up:
    Looks like this is a feature of the KDE KPrinter, as the pdf filter was found in KDE desktop printer KJobViewer. The OOo one that I am aware of, I would expect works only internally from OOo applications, while the Kprinter's to pdf file filter looks to be general available for all applications, if I'm right.
    Tried also a Gnome login to OpenSuse, but didn't see the pdf file filter available for the "Gnome printer". Possibly can it be set up also here?
    Terje J. Hanssen

  • Can't get duplex print option for pdf files using  Adobe ReaderXI 11.0.04, Mac 10.8.5 with HP8600

    I get two-sided option for normal printing, but
    I can't get duplex print option for pdf files using  Adobe ReaderXI 11.0.04, Mac 10.8.5 with HP Officejet Pro 8600.  HP says it's an Adobe problem. I'm stuck.
    Thanks in advance.
    VO

    It depends where the pdf is located. If in the Finder or in an attachment to
    an email in Entourage, the message is ³You can¹t open the application
    ³Acrobat Reader 5.0² because PowerPC applications are no longer supported².
    If an attachment in an email that has come via Safari, the message is
    ³Safari can¹t open the file because no available applications can open it².
    In each case the menu bar is Finder or Entourage or Safari as the case may
    be.

  • "Sumbit Email" button, and generating a pdf file

    I would like to use the SUMBIT EMAIL button to send a pdf file of the completed form. I understand that is sends a data file, that has to be imported back into the form template on the other end.
    Is there a way to autmoate this process, or jsut simply send the completed form in pdf format?
    Thanks,
    Rich

    [email protected] wrote:
    > So, if none of the users has Reader installed, by we install a version of Acrobat, then they should just be able to open up the document as a pdf?
    >
    > What we are trying to create is a standform for our sales people in the field to fill out, and then email in to the respective account managers in the office all we want the account manager to see is a single pdf file of the sales request form. nothing else, no importing of data into a form, etc. just a simple completed and filled out pdf file.
    >
    > will this work if we remove Reader, and only have Acrobat?
    >
    > what steps do I take after I publish the pdf file? the sales person then open it up, fills it out, and then hits the sumbit email button. will it arrive in the Inbox as a pdf file, or the data file?
    >
    > thanks,
    >
    > rich
    In order to email the filled-out PDF with the data in it, you need to be able to save the form.
    Reader only allows you to save an empty form...if you try to save a filled-out form you will lose
    all of the data you entered into it. For this reason, you need one of two options...
    1) Purchase Adobe Acrobat for all of the sales people. Acrobat will allow you to save and submit a
    filled-out form. The steps involved would be:
    - Design your form in Designer and save it as a PDF. Set the properties on the submit button so
    it will submit the entire PDF.
    - Deploy the PDF File to your end users.
    - End user opens the form in Acrobat.
    - End user fills out the form and submits it. The filled-out PDF file will be attached to the
    email.
    2) Purchase Adobe LiveCycle Reader Extensions. With this product, you can reader-enable your
    document so that users can submit the filled-out form with Acrobat Reader. The steps involved in
    this case would be:
    - Design your form in Designer and save it as a PDF. Set the properties on the submit button so
    it will submit the entire PDF.
    - Reader-enable the form by running it through Reader Extensions Server and enabling the rights
    to save form data.
    - Deploy the reader-enabled PDF File to your end users.
    - End user opens the form in Acrobat Reader.
    - End user fills out the form and submits it. The filled-out PDF file will be attached to the
    email.
    Hope this helps!
    Justin Klei
    Cardinal Solutions Group
    www.cardinalsolutions.com

Maybe you are looking for

  • Recompilation causes: ORA-06521 and ORA-06522

    Hi, I've an external function(created in C), which was installed using the normal stuff(associated with a library and used in an external function definition). Everything was working ok, I mean, I was able to call the function from pl/sql programs wi

  • Monthly reports not downloading

    I just received an email from Apple saying my reports for November are ready to download. But when I click on the link in iTunes connect, it shows blank page and doesnt download anything. Anybody facing same issues?

  • Oracle Services not seen in Service Panel

    I am runnig an Oracle 9 database on Windows NT server. For some reason the Oracle Services that was seen in the Services Window of the Control Panel disappeared.I could see the regedit is safe and the Database is running.How do I get the services to

  • Why same fields appearing more than once in a Table like EKPO , KNA1 ???

    hi , in SAP IDES version u will see : In EKPO table : Two fields MATNR and EMATNR having same spec. and showing same redundant data in IDES version . IN KNA1 table : NAME1 field appears twice ... why so ? any utilities / Reason ????

  • How to delete printer preferences

    When I try to go and change the default printer, it reverts back to previous printer. When I try to "use last used printer" option, print to new printer, then go back to print the default has changed back to the old printer. When you go to the printe