Print pdf from WD JAVA

Hi All
I have a requirement to print PDF form from  WD
without to see the PDF form
i'll be glad to see your suggestions
Yossi

iText creates PDFs, but it doesn't print PDFs. I'll look at gsprint; hopefully, it'll do what I need it to do. I do have the luxury of knowing that all users will have a version of Acrobat Reader, so it's too bad I can't kick off a process. The best I could do is kick the process off using Acrobat Reader to open the file and then print from the menu. This won't work since I need a way to ask for type pdf and have windows use the version registered, not the version hardcoded.
For example,
Process pr=null;
String arr[] = {"C:\\Program Files\\Adobe\\Acrobat 5.0\\Reader\\AcroRd32.exe",tmpf.getPath()};
try {
pr = Runtime.getRuntime().exec(arr);
} catch (Exception e) {
e.printStackTrace();
//Handle the exception
I tried using AcroRd32.exe, but it failed in finding it. Anyway, this would be last resort, since the user wants to press a Print button and grab it from the printer. I looked at the Java Print API (we are still on 1.2.2.008, so it'll be end of year before making the leap to 1.4) and it's worse than getting a root canal without novacaine.

Similar Messages

  • I have installed Lion and have problems to print PDF from prewiev.

    I have installed Lion and have problems to print PDF from prewiev. When trying to print Prewiev locks. Anyone out there with the same problem?

    Hello David and Nicole
    I just installed Lion on my iMac, which was purchased in 2007, and I cannot print from Preview; it keeps locking up and not responding. So, I have to force quit Preview. I have been sending error reports to Apple. I suggest everyone who has this problem, send error reports!
    I can print from other applications, like Pages, with my Canon Laserjet. I do not think it is a printer issue becasue I can print in other application.
    I took your advice and installed Adobe reader. Now I can print pdf's.
    Thanks
    Ed

  • How to print PDF files using java print API

    Hi,
    I was goign throw lot of discusion and reading lot of forums related to print pdf files using java api. but nothing seems to be working for me. Can any one tell me how to print pdf files using java api.
    Thanks in advance

    Mike,
    Can't seem to get hold of the example described in your reply below. If you could let us have the URL to get then it would be great.
    My GUI application creates a pdf document which I need to print. I want to achieve this using the standard Java class PrinterJob (no 3rd party APIs I'm afraid, commercial restraints etc ..). I had a stab at it using the following code. When executed I get the pretty printer dialog then when I click ok to print, nothing happens!
    boolean showPrintDialog=true;
    PrinterJob printJob = PrinterJob.getPrinterJob ();
    printJob.setJobName ("Contract.pdf");
    try {
    if (showPrintDialog) {
    if (printJob.printDialog()) {
    printJob.print();
    else
    printJob.print ();
    } catch (Exception PrintException) {
                   PrintException.printStackTrace();
    Thank you and a happy new year.
    Cheers,
    Chris

  • Print pdf from ValueLine

    Ver 11 says plug-in doesn't work; Ver 10 worked fine
    Further information:  tried to print pdf from this site; error message says can't do plug-in.   Just downloaded fresh Ver. 11 today and accepted conditions.  Help, please!

    I'm using Win.7.1, trying to download Acrobat Reader 11, reaching it from 
    AOL 9.7 .  I can't download online pdfs from multiple on-line resources 
    (e.g., ValueLine and your own Adobe site).  After I've de-installed the  Reader
    11 and started fresh, here's what I see:  The installation file  appears in
    my AOL download file.  My Norton Internet Security says its  safe, and I
    double click on it.  (I never get to the warning dialog -  presumably because
    Norton has already vetted the install file.) When I go back  to the download
    file, open it and click on Finish, the installation file  disappears.  I
    never get to step 3 of the installation.  I don't have  a functioning Reader
    XI, either.
    In a message dated 1/8/2014 9:03:43 P.M. Eastern Standard Time, 
    [email protected] writes:
    Re:  print pdf from ValueLine
    created  by Pat Willener (http://forums.adobe.com/people/pwillener)  in 
    Adobe Reader - View the full  discussion
    (http://forums.adobe.com/message/5994918#5994918)

  • HELP! Why can't I print PDFs from my applications?

    For over a year I've used Adobe Pro to "print" PDFs from AutoCAD LT (a drafting program). This allows me to perform design/drafting services for long distance clients and email them PDF "prints" of drawings for them to review, print, and use. It has worked beautifully...until this week. Now whenever I go to print a PDF from AutoCAD (or even other Windows applicacations like Word) it gives me an error telling me to change the Advanced printer preferences to "print directly to printer". When I go into the Adobe printer preferences and select this option. and return to print the PDF, selecting the print command causes AutoCAD to hang indefinitely and eventually crash when I try to cancel the print command. This behavor is the same inside other Windows applications like Word. So I've concluded that the issue is inside Adobe or my computer's Adobe "printer" settings. I've spent 5-6 hours unistalling a reinstalling Adobe several times in hopes to get back to whatever settings that worked before...to no success.
    The last piece to the puzzles is that I was on vacation last week. Instead of the desktop computer in my office that I typically use, I took my old laptop. I only have one license of Adobe Pro. Even though I hadn't used it for months on the laptop, it worked fine creating PDFs from AutoCAD. My question is: did using Adobe on my laptop deactivate the Adobe loaded on my desktop? And if so, why hasn't deactivating and uninstalling the Adobe Pro on my laptop, and unistalling/reinstalling/activating the Adobe Pro on my desktop, fixed the problem?
    I'm at my wits' end...any feedback/advice would be much appreciated!

    In WORD (Sorry I don't have Autocad), can you go to the FILE>Print and print to the Adobe PDF printer with no problem? If not, can you select print-to-file and then open the file in Distiller to complete the conversion? If the latter works, it sounds like you may have disabled AcroTray, a necessary part of the printing process.

  • Problem in printing pdf document with java code

    Hi All
    I want to print a pdf document with java code i have used PDFRenderer.jar to compile my code.
    Code:
    File f = new File("C:/Documents and Settings/123/Desktop/1241422767.pdf");
    FileInputStream fis = new FileInputStream(f);
    FileChannel fc = fis.getChannel();
    ByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
    PDFFile pdfFile = new PDFFile(bb); // Create PDF Print Page
    PDFPrintPage pages = new PDFPrintPage(pdfFile);
    // Create Print Job
    PrinterJob pjob = PrinterJob.getPrinterJob();
    PageFormat pf = PrinterJob.getPrinterJob().defaultPage();
    pjob.setJobName(f.getName());
    Book book = new Book();
    book.append(pages, pf, pdfFile.getNumPages());
    pjob.setPageable(book);
    // System.out.println(pjob.getPrintService());
    // Send print job to default printer
    pjob.print();
    but when i am running my program i am getting error
    Exception in thread "main" java.awt.print.PrinterException: Invalid name of PrintService.
    Please anybody, knows the solution for this error?
    Thanks In Advance
    Indira

    It seems that either there is no default printer setup or you have too many printers or no printer setup at all. Try running the following code. It should print the list of available print services.
    import java.awt.print.*;
    import javax.print.*;
    public class PrintServiceNames{
         public static void main(String args[]) throws Exception {
              PrintService[] printServices = PrinterJob.lookupPrintServices();
              int i;
              for (i = 0; i < printServices.length; i++) {
                   System.out.println("P: " + printServices);
    }From the list pick one of the print service names and set it explicitly like "printerJob.setPrintService(printServices);" and then try running the program.

  • Problem printing PDF from BPM Studio ?

    I'm using JasperReports to try to print a PDF from BPM Studio 10.3.2
    I have tried many ways but always get the same problem:
    Caused by: com.lowagie.text.pdf.PdfWriter.setRgbTransparencyBlending(Z)V
    Caused by: java.lang.NoSuchMethodError: com.lowagie.text.pdf.PdfWriter.setRgbTransparencyBlending(Z)V
    I added all the needed jars as external resources and catalog them as Java components.
    Anyone dealed with this issue before?
    Thanks in advance!
    /Patricio
    ps: sorry for my english, but isn't my native language.

    Actually, Word 2013 supports opening of PDF files and creating Word documents from same. The problem is that for anything other than very simple PDF files, the conversion is wonky at best!
    The popup mentioned by “bannerman” is definitely not an Adobe Reader message, but possibly an annotation of something generated by JavaScript.
              - Dov

  • Getting error while printing PDF from ABAP Report

    hi everyone,
    I am trying to print PDF form from a report. But the output i get is an error msg on the Paper
    ERROR: limitcheck
    OFFENDING COMMAND: PDF Parser: Damaged PDF file, failed reading trailer STACK:
    thanks.

    Some additional information:
    In the defaulttrace, I can see this:
    Service XMLFormService: Native process (PID=15892) E:\usr\sap\PEP\JC00\j2ee\os_libs\adssap\XMLFormService\bin\XMLForm.exe terminated abnormally with error code 128
    Processing exception during a "Render" operation.
    Request start time: Fri Mar 06 10:11:55 CET 2009
    com.adobe.ProcessingException: XMLFM Exception during render: org.omg.CORBA.COMM_FAILURE
    Exception while connecting to <SERVER-IP>:3533
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method

  • Print pdf from another frame in IE via javascript

    I am responsible for a little web application. There we have 2 frames. In one frame is an pdf-file, this frame is not visible for the user. In the other frame is an button. By clicking the button the pdf-file should be printed.
    The onclick event handler of the button looks like that:
    parent.pdf.focus();
    parent.pdf.print();
    This works with firefox with all acrobat reader versions and IE up to acrobat reader version 6. But there is a problem with IE an adobe reader plugin version 7 and 8. In this constellation the user is presented the normal printing dialog of the IE and not the printing dialog of the adobe reader plugin.
    Is there any workaround to solve the problem.
    Pressing the print-button of the adobe reader plugin is no solution because the frame with the pdf-file is not visible for the user.
    Thanks a lot
    Matthias G.

    iText creates PDFs, but it doesn't print PDFs. I'll look at gsprint; hopefully, it'll do what I need it to do. I do have the luxury of knowing that all users will have a version of Acrobat Reader, so it's too bad I can't kick off a process. The best I could do is kick the process off using Acrobat Reader to open the file and then print from the menu. This won't work since I need a way to ask for type pdf and have windows use the version registered, not the version hardcoded.
    For example,
    Process pr=null;
    String arr[] = {"C:\\Program Files\\Adobe\\Acrobat 5.0\\Reader\\AcroRd32.exe",tmpf.getPath()};
    try {
    pr = Runtime.getRuntime().exec(arr);
    } catch (Exception e) {
    e.printStackTrace();
    //Handle the exception
    I tried using AcroRd32.exe, but it failed in finding it. Anyway, this would be last resort, since the user wants to press a Print button and grab it from the printer. I looked at the Java Print API (we are still on 1.2.2.008, so it'll be end of year before making the leap to 1.4) and it's worse than getting a root canal without novacaine.

  • Printing PDF's in Java

    Hi,
    I am in the process of trying to silently print PDFs via java in a Windows NT 4.0 environment. The solution so far has been to convert then into postscript files using pdftops (co/ xpdf) and then simply send the postscript file to the printer using the java PrintService.
    Which would work fine except for the fact that I need to print envelopes (DL and C4) (not a problem but for the fact that some of the printers only have Postscript Level 2 Emulation and don�t recognize the fact that an envelope is being printed).
    And I need to be able to print to a specific (i.e. default) tray on a network printer, and using the java PrintService uses the wrong tray.
    Tried using JPedal and JPrint, and the get past the tray problem but haven�t tried them with the envelopes yet � can�t see that being a problem though.
    Big question is does anybody have experience with print files from java to a specific tray on a network printer.
    Thanks
    Richard Peters

    duffymo
    Acrobat 5.0 when I open a pdf on my system.
    This is exactly the code currently in my program.
    I just ran it again to test it and it works.
    1) The application has an ugly square gray box on the screen while printing.
    2) The Acrobat reader starts on the task bar.
    3) For the application to continue I have to expand the reader and close it myself.
    public void actionPerformed(ActionEvent e) {
      String selectedDocument = SelectedDocument();
      if (selectedDocument != null) {
        try {
          String command = "C:\\Program Files\\Adobe\\Acrobat 5.0\\Reader\\AcroRd32.exe /t "+selectedDocument+" \\\\CONTROL\\HP LaserJet 4L";
          Runtime rn = Runtime.getRuntime();
          Process process = rn.exec(command);
          process.waitFor();
        catch (Exception pEX) {showSystemError("Unable to print document.", selectedDocument, pEX, false);}
    }It is not what I wanted to do - I wanted to do the print
    internally in the program.
    rykk

  • Print PDF from Forms

    Hi
    I wonder if anyone can help. We're running Forms 10.1.2.30 against an Oracle 10.1.0.5.0 database using IE8 on Windows XP and Windows 7 clients.
    We generate utility bills using Oracle Reports. These work fine at the moment as we print these reports directly to the printer from Reports. However, we now need to perform some post processing to the bills so I would like to produce the bill to a PDF, perform some post processing and then send the PDFs to the printer on batch.
    Does anyone have any tips on how to send the PDFs to a printer on batch? I can host it out to Acrobat using the undocumented/unsupported /t option, but I would rather not rely on third party software (especially undocumented/unsupported features).
    I've found a link to the Oracle Forms PJC/BEAN - PDF Project, but I cannot download the file. Something to do with the download site been seized by the FBI!
    https://sites.google.com/site/jvrpdfproject/version-1-5-2-english
    Thanks in advance.
    Neil

    Hi.
    What mechanism do you use now to send a PDF to printer? Do you have each printer defined on middleware (application server) or you download pdf from application server an print it localy?
    Best Regards
    Gregor

  • Printing PDF from IE9 doesn't honor printer settings

    I am trying to print a PDF from IE 9 and have it honor my printer settings (which are to store to my mailbox on our Canon iR3035 rather than print out).  It used to work fine.  I found the following bug listed in the release notes for Adobe Reader 10.1 however it clearly says the fix is to update IE which clearly isn't fixing the problem.  If I disable protected mode then it works but that isn't what we should have to do for this to work.
    Windows 7 Pro 32 and 64 bit
    Adobe PDF Reader 10.1.1.33 and 10.1.2.45
    Internet Explorer 8 and 9
    "Internet Explorer: With Internet Explorer running in protected mode, the user's printer settings are not honored, and the manufacturer's or deployer's defaults are used. This behavior occurs for IE7/IE8 with Acrobat/Reader 9.x or IE7 with Acrobat/Reader 10.x. The workaround is to disable Internet Explorer protected mode, or upgrade to IE8. [2874948]"
    Anyone know of another workaround other than turning protected mode off??
    Thanks!
    Jake

    Hi Sonal,
    Thank you for continuing to try to track this down.  The snapshot you show is exactly what we want the behavior to be however it's not what is happening on our systems here.  I'm not sure what else I can provide to try to help reproduce the problem however it is the same on multiple systems.  Here is some more info (I apologize in advance for the number of snapshots but I hope they will lend useful info!).  Please let me know what else I can provide that would help!  These snapshots are from my system which is 64-bit (32-bit systems exhibit the same symptoms).
    Adobe Reader is version 10.1.3:
    Adobe PDF Reader add-on in IE is 10.1.3.23:
    IE is version 9.0.8112.16421 update version 9.0.6 (KB2675157):
    IE Security settings tab:
    Printer Driver version - Go to Control Panel, Devices and Printers, Print Server Properties, Drivers tab, Choose Canon iR3035/iR3045 PCL6 and click properties, Click on Driver File and click properties, Detail tab:
    Printer Preferences:
    Printing the samplepdf.com homepage in IE9:
    Printing the samplepdf.com pdf file in IE9:
    Hope these help. Thanks for your time!
    Jake

  • Cannot print pdf from Excel. Saving as log file

    I am trying to print an Excel page to pdf and everytime I get an error.
    I am using Adobe Acrobat 9 and Excel 2010

    You printed to Adobe PDF from excel.
    There was an error which prevented the pdf from being created.
    That log file lists the errors and seeing it's content might enable us to determine why the job failed.
    Open the log file with Notepad or any text editor (Word)
    Copy that text to this forum

  • Printing PDF from IE with Adobe Reader - extra white space at top of page

    I searched the forums far and wide but did not find this question or information to answer it.  If it's out there, I'd be much obliged if you'd point me in the right direction.
    A user of the web app for which I do tech support just called to say that starting today, whenever he opened a PDF from our app (in IE), the PDF looks fine on screen but when he prints the PDF, every page has extra blank/white space inserted at the top, which cuts off the bottom inch or two of each page.
    No other users have called with this complaint, and if changes to our app or an automatic background Adobe Reader or IE update caused this problem, I would have heard from many users.  I have a sneaking suspicion I have heard about this from other users, but since troubleshooting their IE or Adobe isn't exactly my job, I don't know if I did any more than advise them to talk to their tech support people. 
    I can't recreate his problem (read: it works fine for me), but I'd like to help him.  Can anyone think of a reason why this might be happening?
    Thanks in advance.

    What I know:  He's using Adobe Reader X.  I do not know if it's the most recent version.  The problem only exists with PDFs from our web app; he's not having trouble with other sites or with other PDFs.
    I do not have a copy of the PDF; I can't give you the copy I downloaded when I logged into his account because there is proprietary confidential information on it, but everything worked fine for me and he's the only user with this complaint, so I believe it's related to his PC or printer, not to our app or to Adobe per se. 
    I sent him email asking for more information, but I do not know what printer he's using.  I don't even know what version of Windows he's running. 
    Based on some info from Adobe, I suggested he make sure he's using the most recent version (10.1.2), try 'print as image" to see if that's any more successful, and make sure his printer drivers are up to date. 
    Given the nature of tech support, if he solves the problem or finds a workaround he's happy with, I may never hear from him again to know.  I just wanted to know if this was a known issue and what recommended resolutions for it might be.  Having not found anything on the web at large, I figured the Adobe forums would be a good place to ask.
    Thanks for the time you took to answer.

  • Print pdf from shared drive

    Hello Experts,
    I have a requirement to print PDF document from SAP without user interaction.
    Here PDF document will be in another server say, shared drive. In simple way, if i execute the program (shared drive path of the document will be hardcoded in program) PDF document(which will be on shared drive) will get printed on local default printer.
    Please help me if anybody worked on similar requirement.
    Thank you very much

    In SAP Business by Designer, there is a reuse component called "Output management", which can enable end users to preview and print PDF document in a very convenient way. The printing is implemented in method:
    PDF binary data and printer code can be stored in ls_print_data.
    CALL METHOD cl_output_service=>document_output(
                    it_attachment_ids = lt_att_ids
                    is_archive_folder = ls_archive_folder
                    is_application_id = ls_application_id
                    ip_in_update_task = abap_false
                    ip_application_queue_id = lv_output_queue_id
                    ip_output_immediately = lv_output_imm
                    ip_output_at = lv_output_plan_time
                    ip_subject = lv_email_subject
                    is_recipients = ls_recipients
                    is_docdata = ls_docdata
                    is_send_data = ls_send_data
                    is_print_data = ls_print_data

Maybe you are looking for

  • Questions about buying a new Mac Pro for 4k video editing.

    Hi everyone, I'm currently looking into buying a new mac pro and I have a few questions. I'm a filmmaker/freelance editor looking to get a system that can handle any/at least most 4k formats that I might throw at it, and will hopefully last me around

  • IDoc creation on save and change of production order

    I am looking for a way to create, and send if possible (if not I'll send with a batch job), on the save (creation and change) of production orders.  This will be a modified LOIPRO iDoc.  Currently we have a customer exit on the save of the production

  • WM Replenishment for storage type

    Hi there, I implemented the replenishment solution for a fixed bin and is working well. But our bussiness needs to use the replenishment for several bins located on one storage type. In other words, we need a replenishmente not for a fixed bin. I tri

  • Photo stream after iPhoto Library Move

    OK, so I have moved my iPhoto library to an external hard drive (had to clear up space on my MBP). I now want to open iPhoto & generate a new library. My intention is to use this going forwards. I will not be regularly attaching the hard drive with t

  • How to set array with JSTL/EL

    Using EL in JSTL I would like to create an array but I can't get it to work. Something like <c:set var="myarray[3]" value="{'1','2','3'}"/> and then accesing it by '<p>First: <c:out value="${myarray[0]}"/></p>' I have tried a number of ways but no lo