Print in command line?

I have this Java program, in command line, i want to print a hard copy of the output, is it possible?

I know, that's a bit sarcastic, and probably more than a bit so. Well, put the output to a textfile, rather than the console and print that.
If you want to see it and print it (without manually doing anything, then extend PrintStream and override it's print method to output to both a textfile and the console, then at the end of the program (if it has a logical end, or wherever it "aborts"), print, then remove the textfile.

Similar Messages

  • How to print pdf's direct to default printer by command line

    I want to direct print pdf's to the default printer by command line.
    this work's with:
    C:\Programme\Adobe\Reader 11.0\Reader\AcroRd32.exe /n /s /h /t test.pdf
    But at the end, when printing was done. Adobe does not close automatically.
    Is there an opportunity to automatically close adobe after printing?

    No, Adobe stopped that happening many releases ago, for reasons that I don't understand but they will not change.

  • Adobe XI remains open after printing from command line

    I am using a program to collect, batch print and delete multiple PDF files.
    The following command line is used to print the files, after which the file is deleted and next file is collected.
         "C:\Program Files\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T /N FileName.pdf
    I have now upgraded to Adobe XI, however Adobe remains open (and minimized) after sending the print job to the printer, resulting in my programing freezing while waiting to delete.
    Is there a parameter to close Adobe after printing?
    This is rather urgent as we have started rolling out the new Adobe XI.
    OS = Windows7 Prof x64

    Command line parameters are sparsely documented and are officially not supported. What is documented can be found here: http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/intro_to_sdk/DeveloperFAQ.pd f
    I've not seen anything that shows what you want to do.

  • Print using command line

    Hello experts,
    As mentioned in http://support.adobe.com/devsup/devsup.nsf/docs/52080.htm we can use command line instruction to open a pdf file in Acrobat Reader and print it.
    Does anyone know if this works both in Windows and in UNIX?
    Thank you.
    Gie Kian Siauw

    Hi Gie,
    On Unix, you can use commandline instruction to create ps files from the pdf files.
    for eg. "acroread -toPostScript -pairs a.pdf a.ps"
    You can also pipe the ps output to a printer.
    for eg: "acroread -toPostScript -pairs a.pdf - | lp -d <Printer Name>
    This is a headless process of printing pdf files without the launching of acroread.
    The file is not opened in the acroread and just printed.
    Regards,
    Rishi

  • Printing to a network printer by command line

    Hi
    I would like to know how to print to a network printer from the command line using its IP.
    In windows we can do:
    lpr -S<Server Ip> -P<Server Ip>
    How can I do it in linux?
    I could not find any clue in the man page and have googled but vainly. Always I was redirected to CUPS.
    Thank you!
    Serge

    My question in fact is: Is it posible to print directly to the IP of the printer, not to its name?
    I think in general you can't do this.  With the standard tools ( CUPs, LPD, etc. ) you need to first set up the print queue(s), then specify which queue to send the jobs to by name.
    There was a tool called rlpr which did exactly what you're looking for, but it is completely separate from CUPS and the other print spooling software, and it's site seems to be down ATM.

  • Setup a printer from command line issues

    I have been trying to figure out why my arguments are not working. I was originally creating a .bat file with the PrinterUIEntry commands, but I was getting an "Invalid Argument" error. I switched to the cscript method and I am still not understanding
    why it get errors on the driver install and printer install. The user of the created batch file will be non-IT users. I want to send a package with them with the unzipped printer drivers and install using the .inf file. I can't seem to get it
    working properly and don't want to waste more time trying to figure out what is wrong. Any help would be appreciated. Thanks!
    ====First method attempted====
    rundll32 printui.dll,PrintUIEntry /ia /c\\L638 /l "C:\Temp\NC Print Drivers\dellopd_A06\dellopd.inf"
    ----Error read "Invalid Arguments"
    rundll32 printui.dll,PrintUIEntry /if /c\\L638 /f "C:\Temp\dellopd_A06\dellopd.inf" /b"Dell 5210n" /u /r "IP_192.168.10.157"
    ----Error read "Invalid Arguments"
    =====Current method====
    cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r IP_192.168.10.157 -h 192.168.10.157
    ----This creates the port just fine, no errors
    cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs -a -i "C:\Temp\dellopd_A06\dellopd.inf" -h "C:\Temp\dellopd_A06"
    ----Error reads "Unable to add printer driver Error 0x80041008"
    cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -a -p "Dell 5210n" -r "192.168.10.157"
    ----Error reads "Unable to add printer Dell 5210n Error 0x80041008 invalid parameter
                              Operation PutInstance
                              Provider CIMWin32
                              Description
                              Win32 Error Code"

    Hi,
    Would you please try following commands?
    Please don't add quotes on the inf file path: change the driver folder name NC Print Drivers as NCPrintDrivers.
    rundll32 printui.dll PrintUIEntry /if /f C:\Temp\NCPrintDrivers\dellopd_A06\dellopd.inf /r "192.168.10.157"
    Make sure to run the command as admin.
    Let me know if it can work fine.
    Kate Li
    TechNet Community Support

  • Reader 10.1.4. Printing PDF by command line

    Hi
    In an application I have developed I print PDF files to a defined printer using command line, such as
    "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\acrord32.exe" /N /T "myPDFfile.pdf" "\\servername\printername"
    I have noticed a change of behaviour with Reader 10.1.4 to previous versions.
    To test locally I share a local printer (e.g. share name "bobsprinter") connected to my machine ("bobsmachine") and include it in the command line as follows
    "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\acrord32.exe" /N /T "myPDFfile.pdf" "\\bobsmachine\bobsprinter"
    I have noticed that with Reader 10.1.4 a print job is no longer submitted, unless I take out the machine name and just leave in the shared printer name:
    "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\acrord32.exe" /N /T "myPDFfile.pdf" "bobsprinter"
    Where it then works OK.
    Question: Why would there be this change of behaviour in 10.1.4? Is there anything I need to consider? I have not come across anything in the release notes.
    I have noted that on my customer's site my command line (with machien and printer name) still works OK with 10.1.4. Maybe because the shared printer is on another network?
    Many thanks in advance.

    Hi Bob,
    Thanks for reporting the problem faced by you. My investigations suggest that command line printing behavior between Reader 10.1.3 and 10.1.4 is still the same.
    It prints the document on Reader 10.1.3 and 10.1.4 only when you do not specify the servername(localhost) on command line. However, It prints both with/without using the servername when Acrobat is used.
    Thanks,
    Atul Agarwal
    Adobe Systems

  • How to print a specific page from a given PDF document, using command line, please?

    Hello,
    I need your advise, please. My customer requires to print a specfic page from a pdf document they receive, using command line or 3rd party solution.
    Anything you can advise, please? I have seen AcroRD32.exe options, but can only print the whole document.
    Kind Regards

    Not sure if there are any examples. The Acrobat SDK is a must, but it is best treated as documentation to study rather than examples to copy. The examples only illustrate a tiny fraction of the capabiliies.
    (One other note: the solution must involve the client owning Acrobat; Acrobat is not for server use).

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer."C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>". Current Situation: The above command line parameter when executed is working as expected in a User's Workspace. When executed in a command line on the Application Server is working as expected. But, the same is not working while executing it from Deployed environment.Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2. Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

  • Is there a way to print/convert a file to PDF from the Command Line? If so, how?

    I'm trying to do something that I imagined would be really simple, but I haven't found a good resource on how to thus far. I'm trying to do something along the lines of this:
    Acrobat.exe /print inputfile.xls outputfile.pdf.
    Does anything like this command exists?

    For automating Acrobat there are many interfaces for programmers, but no command line like that. (Microsoft declared command lines dead almost 20 years ago, but they've been an unconsionable time a dying).

  • Can I print the last page of a PDF document using command line?

    Hi
    I am in a situation in which I constantly have to deal with multiple PDF documents and I need to print the last page in each of these, and ONLY the last page. The total number of pages will vary for each file, so the page number for the last page will also vary.
    I would really prefer to not do this manually, by opening up each file in the visible Adobe Reader window and then print.
    Question:
    Is there a way with Adobe Reader (maybe with the help of some other Adobe product) to print only the last page of a PDF document using some kind of command line without opening up the PDF file in the visible Adobe Reader window?
    I'm using Windows.
    Thanks in advance,
    Regards,
    Emil

    Thank you for taking the time to reply.
    I tried both ways and neither works.  It gives me a prompt box that I have to click "next" for every page but after going thru all pages, nothing is sent to the printer.
    Also, all directions I've read indicate it will print to the default printer.  If my default printer is on a network, will that cause problems....
    and...
    should I be getting a prompt box on every page?  I thought all this would happen behind the scenes and not force me to interact with every page.
    dc

  • How can I print the test page with the Arabic type from the command line

    Hi,
    I have been trying to make the tool for printing the test page from the command line on the Arabic OS. I used "rundll32 printui dll printuientry" with "/k /n" options. My tool is to print the test page in all OS when pushing the
    button.
    Normally, in the Arabic Windows, the test page is printed with RTL type when printing the test page in the "Devices and Printers". But in my tool, the test page is printed with LTR type. I'm confused because of this result.
    Is it possilbe to print the test page with RTL type when using the "rundll32 printui dll printuientry"? If it is possible, could anyone give me the hint or information for resolving?
    Please check for me.

    Hello,
    Thank you for your post.
    Your issue is out of support range of Test Tools in Visual Studio 2010 and 2012 forum which discusses Visual Studio Test issues.
    I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Command line parameters to print to a file

    Hello
    is there a command line parameter for acrord32.exe to specify a filename to print to - just as if i ticked the box in the print dialog to print to a physical file?
    If not does anyone know how i can do that?
    Thanks
    Sean

    Asserts are disabled by default. Use the -ea switch to enable asserts or -da to explicitly disable them.
    You can find documentation about the assertion facility at http://java.sun.com/j2se/1.4/docs/guide/lang/assert.html
    Remember, the Java Docs http://java.sun.com/sun/ are your friend!

  • Can i print a file using thunderbird with command line switch

    Trying to automate printing task. I have a folder with 1000's and 1000's of eml files that need to be printed using thunderbird.
    I am able to get the command line switch to open the file in thunderbird.
    But what i really want is to print these files directly using thunderbird without opening the file in GUI.
    Thanks
    Dennison

    ส่งจาก จดหมายของ Windows
    จาก: Pat Willener
    ส่งเมื่อ: จ. 5 มกราคม 2558 6:15
    ถึง: thang dinhvan
    How can I print a file with mixed page orientation in windows 8.1?
    reply from Pat Willener in Adobe Reader Touch for Windows 8 - View the full discussion 
    I have a win 7 and a win 8.1 computer.  I have a file which contains both landscape and portrait pages.  The file prints correctly with the mixed orientation from the win 7 pc, but will only print with either landscape or portrait on the win 8.1 pc. 
    I am using Adobe reader XI on the win 7 pc and adobe touch on the win 8.1 pc
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7064031#7064031 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7064031#7064031
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in Adobe Reader Touch for Windows 8 by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Command line printing - AdobeReader left open

    Hello everyone,
    I've a problem by printing pdfs using the command line. My VB-script contains a code line like following (including the quotation marks for document and printer):
    process=myShell.Exec("c:\Program Files\Adobe\Reader\Reader 8.0\AcroRd32.exe /t "c:\test.pdf" "myprintersname")
    (print test.pdf on myprintersname)
    This command runs nearly perfect; after printing the AdobeReader-window left open. I tried to use an Application.Activate(process.ProcessID) followed by SendKeys("%{F4}") to close the front window. My AdobeReader-window won't come to foreground and so the active window (e.g. firefox) gets the ALT-F4-shortcut and asks for closing.
    Is there another command line parameter or solution available to close the named pdf-document AND AdobeReader after printing the document?
    Thanks for help
    gerald
    UPDATE: I've found a solution for this problem. After executing the command line (process=myShell.Exec.......) there's a "script sleeping time" needed, e.g. WScript.Sleep 10000 (wait 10 sec) followed by the command "process.Terminate". Then AdobeReader will be terminated and script goes on...

    Command line parameters are sparsely documented and are officially not supported. What is documented can be found here: http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/intro_to_sdk/DeveloperFAQ.pd f
    I've not seen anything that shows what you want to do.

Maybe you are looking for

  • Alternative Periods in Report Painter

    I'm trying to create a report painter report for labour efficiency, it compares actual labour confirmations to a statistical key figure for payroll hours. I have the basic elements, but my problem is this.  We currently run our accounts on a calendar

  • When I Apply Redaction to the selected area the area is redacted, however the rest of the doc becomes unreadable. Is there a fix for this?

    FYI - I am using Acrobat X Pro v 10.1.13 If I convert a MS Word Document to a PDF file the Redaction works fine without affecting the rest of the document. The problem I am describing below only seems to happen on documents that have been scanned to

  • Z1 Camera Button not Working!

    Hello everyone, My z1's camera button launches the camera app only approximately half the time. So when it doesnt launch the normal, usual way when i press on it, I would press doubly hard to try to activate the camera and still sometimes it doent wo

  • DBD::Oracle & Instant client - don't find tnsnames.ora

    Hello, I'm trying to use tns names in Perl scripts to connect with Instant client. I always get the ORA-12154 error when connecting with Perl : ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach). The perl c

  • Forms in function module

    Hello, I am new to ABAP and i am trying to loop through one table and make another table if certain fields match. Here is my code. It does not work Any help would be greatly appreciated. FUNCTION Z_ORGBUILDER_CONN. ""Local interface: *"  IMPORTING *"