"AcroRd32.exe /t" print a PDF document ( print only, no need to open )
I'm using the following command to print a PDF document:
"D:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe" /t "D:\R104-20071025165656.pdf" "\\192.168.0.4\hp" "hp LaserJet 1000" "\\192.168.0.4\hp"
Now it works fine! But I have more request:
I want a command that only send the file to printer and no need to open the PDF file on local system.
So anybody can help me?
Thanks in advance!
Dear Pedja,
My program is a desktop application, no a web application. It's not the same as you. And hope the following codes can help you :)
private void exportReportToPrinter(JasperPrint jasperPrint,int copyNum, String printerName, MediaSizeName mediaSizeName) throws Exception
// create the print service exporter so that we can print to a named
// printer
JRPrintServiceExporter exporter = new JRPrintServiceExporter();
// set the report to print
exporter.setParameter(JRPrintServiceExporterParameter.JASPER_PRINT, jasperPrint);
// tell the exporter to print 1 copy on A4 paper
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(new Copies(copyNum));
aset.add(mediaSizeName);
exporter.setParameter(JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET, aset);
// let the exporter know which printer we want to print on
PrintServiceAttributeSet serviceAttributeSet = new HashPrintServiceAttributeSet();
serviceAttributeSet.add(new PrinterName(printerName, null));
exporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE_ATTRIBUTE_SET, serviceAttributeSet);
// print it
exporter.exportReport();
Muiz
Similar Messages
-
Whenever I try to print a PDF document, I get a message indicating there is a runtime error, and for me to contact you. My system is Adobe reader 9.3
A runtime error is a computer error that appears in the form of a message box consisting of a particular code along with its corresponding definitions. Usually, a user will notice that the computer becomes noticeably slow before a runtime error appears.
After the runtime error message has been displayed and closed, the software that shows this error would normally close or freeze. In some cases, the operating system will reboot.
A wide variety of errors cause these problems. These include:
conflicts between the TSR (Terminate and Stay Resident Program)
currently running applications
software issues
memory problems
and harmful applications such as computer viruses
With this, the procedures necessary to correct this type of error differs from one case to another. If the runtime error you are experiencing were caused by a TSR then you can simply use the "end task" function of the Task Manager.
If you consequently encounter a runtime error that is persistent, the software that displays the error message has certain issues and problems. You can resolve this problem by visiting the website of the software's developer and downloading and installing all the updates and patches needed for the smooth running of the software. However, if you have already installed all updates and patches and the runtime error message still appears, you can opt to uninstall and reinstall the program.
Another type of runtime error is usually caused by memory issues. In this case, it is a good idea to first contact the developer of the application that caused the error message. More often than not, they can provide you with a possible set of solutions. But if their given solutions cannot resolve the issues, you need to contact the manufacturer of your computer or motherboard and ask for a technician or someone from the company who can assess your hardware.
A different type of runtime error is caused by harmful programs such as viruses and other malicious processes. These harmful programs are capable of altering the computer's settings. With this, they are very much capable of generating runtime errors. In order to prevent runtime errors that are caused by such malicious programs, you need to frequently update your antivirus software. If your PC does not have a good software security program, you need to install one and scan your computer for possible threats to the stability of your system and the security of your private data.
What all that means is: There is something in the Adobe Reader that is not functioning properly once it is opened.
The best way to resolve this is to:
1. Uninstall Reader (using the Control Panel).
2. Download and install the Windows Installer Cleanup Utility (msicuu2.exe)
3. Run the Windows Installer Cleanup Utility to remove the installer for Reader 9 (and previous versions if they are still installed).
4. Download and install a new copy of Reader, and update it (if required) to 9.3.1. -
Why can't I print a PDF document?
when trying to print a PDF document I get the error message " unable to print document". Sometimes also includes "No pages are selected''.
I'm using an HP laptop and OS Windows 7.
I have tried selecting all document,and printing it as image, I have checked that there are no security locks on the document. I have been through the forum several times searching for answers and still I cannot print a PDF.
Advice please on what other steps I can take.Pat Willener,
Many thanks for the helpful suggestions. . Sean Mitchell's suggestion of
repairing Adobe reader via the help menu did the trick. I have been able to
print several PDF documents after following his suggestion.
Very many thanks for the assistance
Peter Goldsworthy -
How to print a PDF document in duplex mode using command prompt?
I want to print a pdf document in DUPLEX mode by command prompt.Already tried with /p and /t.
Hello Ram,
Please see this link - http://www.coolutils.com/Print-PDF-duplex-cmd
~Deepak -
Adobe Acrobat 9 Pro do not open when printing a pdf document. Can anyone help?
Adobe Acrobat 9 Pro do not open when printing a pdf document, instead I open it with Adobe Reader X to be able to print.
Can anyone help?Hi Edna,
It sounds like Adobe Reader X is your default PDF file handler. Launch Adobe Reader X. Choose Edit > Preferences > General. Click the 'Select Default PDF Handler' button at the bottom and choose Acrobat 9 from the drop-down menu. Click Apply, then OK.
Restart your computer. Acrobat 9 should now be your default PDF file handler again.
-David -
Printing a pdf document created in Acrobat Pro 9.0
Solved the problem of printing a pdf document created using Acrobat Pro 9.0 with SL - tried many different things form adobe etc and by accident discovered while in Acrobat you have to select ADVANCED in Print then click onto SAVE AS IMAGE in next box and then OK and all prints as it should. Just thought others may want to know this if they have had problems 1
I'm reviewing your post and while I see a fix, I can't locate the problem that you may have originally posted. Since I'm having issues, I'm hoping your's were the same.
Sometimes when I print an Adobe Acrobat 9.0 document, most of the printed word fail to print out (although they are in the PDF document). Almost all graphical elements print and the occasional line of text--but most text is missing. Was ti your issue?
Thanks. -
Relative hyperlinks in pdf documents printed from visio 2007
Hello to all. The problem we are trying to solve is to maintain relative hyperlinks that were created in visio 2007 when we publish or print a pdf document. The pdf document that we printed is written in adobe reader 9, and it maintains the hyperlinks but as absolute ones and we required the hyperlinks to maintain as relatives. The idea is to distribute the pdf document with its hyperlinks and the documents that are linked to it in different computers that are not in the same network. The documents that we are trying to link are pdf, word and excel 2007 documents. The operating system we use is Microsoft vista home premium. Does anyone know how to maintain relative hyperlinks in a pdf document printed from visio 2007? Thanks in advance!
Bernd Alheit, thanks for your answer. We print the pdf document from visio 2007 and then we read it in adobe reader 9. The relative hyperlinks work fine in visio 2007, but they change to absolute ones in the pdf document.
-
Printing a PDF document to Adobe PDF rotates 90degrees clockwise
When I print a PDF document (scanned) to the Adobe PDF printer the resulting document is rotated 90 degrees clockwise. Regardless what settings are in Pro or the Adobe PDF writer.
How do I prevent Acrobat Pro or Adobe PDF from rotating documents?
(CS6 / Windows 10 / Lenovo X1 Carbon)Settings that produce a rotated document:
-
Acrobat X and XI will not print many pdf documents.
Acrobat X and XI will not print many pdf documents. When I click Print, the document fades and I get a dialog box that says "Adobe Acrobat has Stopped Working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available." I was experiencing this with Acrobat X so I upgraded to XI, but the problem is exactly the same. I am using Windows 7 Professional operating system.
Thank you for your reply. I have several printers available on our network,
the program doesn't even go as far as allowing me to select a printer. I am
trying to print to an HP 1320n or a LANIER MP C5502 PCL 6. I have changed
the default printer, but the result is still the same. In does the same
thing with Adobe (Standard XI) PDF set as the default printer.
Stan Reznicek
WinWholesale
3110 Kettering Blvd
Dayton, OH 45439
937-294-4249
[email protected] -
Unable to print a pdf document
I have an HP Officejet 4315 All-in-One Printer and have been unable to print an pdf document. I have Adobe X installed.
How can I get the print to work on pdf documents?How are you trying to print to pdf?
Don't go via PostScript or Acrobat Distiller, which are old deprecated technology.
You use:
Menu > File > Print > PDF (button bottom left) > Save as PDF…
Peter -
How can I print a PDF document?
How can I print a PDF document?
That states that the PDF touch app doesnt support printing which is a technically true as it doesnt have a button/option to print from the app but doing a crtl-p (this is on a full PC version of win8 not RT) brings up the print dialogue and its prints fine.
-
How can I print a PDF document in OSX 10.8 Mountain Lion?
I just upgraded to OSX 10.6.3 and now 10.8 Mountain Lion. I am extremely disappointed that I can no longer print (to my printer) ANY PDF documents either through Adobe or straight from a website. Is there a way to deactivate the security feature that is blocking this? I also own the newest version of Parallels (desktop 7) and cannot print through Windows either. It's beyond annoying. Thank you!
MattI can print (such as e-mails, driving directions, etc), but nothing that is related to Adobe or PDF. I have a Dell 1710 printer that is connected to my airport extreme wirelessly. The printer has always worked on my I-mac since I bought it in 2007. It stopped printing PDFs ont he Mac when Adobe was upgraded about a year ago. I was then able to print through Adobe in Parallels/Windows. Since the new OSX 10.6 and 10.8 came out, nothing prints through Adobe in either place. I hope that helps.
-
I cannot print a full PDF document from my computer. I open the document and select my printer and click print and I only get the first page. I tell it to do a range of pages and I sometimes get the first 2 pages. Can anyone tell me if there is a setting somewhere that I can change to get this to work. I have downloading the document and saving it to my computer and then printing, and still no luck. This is becoming VERY frustrating.
Thank you for any help you can give.iguynn wrote:
I cannot print a full PDF document from my computer. I open the document and select my printer and click print and I only get the first page. I tell it to do a range of pages and I sometimes get the first 2 pages. Can anyone tell me if there is a setting somewhere that I can change to get this to work. I have downloading the document and saving it to my computer and then printing, and still no luck. This is becoming VERY frustrating.
Thank you for any help you can give.
First what program are you using to open the pdf document that would be a start? Also what kinda printer do you have? And also look here as well:
First Time Here? Learn How to Post and More
I am a Volunteer to help others on here-not a HP employee.
Replies aren't online 24/7 because of Time Zone differences.
Remember in this Day and Age of Computing the Internet is Knowledge at your fingertips if you choose understand it. -2015- -
I am having trouble printing a PDF document. Whenever I click print nothing happens but when I am printing documents from Word, Excel etc they print without a problem. I've tried printing as image but that did not work. I uninstalled Adobe Reader XI and downloaded Adobe Reader X instead and that still doesn't work. I have Windows 7.
Hello,
Please follow the link to troubleshoot the printing issues with Adobe Reader:- Troubleshoot PDF printing | Acrobat, Reader.
Regards,
Nakul -
Printing a PDF document using Java 1.4 Printing API
Hi,
When I tried to print a PDF document using JAVA 1.4 Printing API, I got the following exception.
Exception in thread "main" sun.print.PrintJobFlavorException: invalid flavor
at sun.print.Win32PrintJob.print(Win32PrintJob.java:290)
at Printing.main(Printing.java:40)
I am able to print the same PDF document using Acrobat reader.
Is PDF format not supported in JAVA 1.4 printing API? or is something wrong in my code?
here is the sample JAVA program that I was using
import javax.print.*;
import javax.print.attribute.*;
import java.io.*;
public class Printing {
public static void main(String args[]) throws Exception {
String filename = args[0];
PrintRequestAttributeSet pras =
new HashPrintRequestAttributeSet();
DocFlavor flavor = DocFlavor.INPUT_STREAM.PDF;
PrintService defaultService =
PrintServiceLookup.lookupDefaultPrintService();
DocPrintJob job = defaultService.createPrintJob();
FileInputStream fis = new FileInputStream(filename);
DocAttributeSet das = new HashDocAttributeSet();
Doc doc = new SimpleDoc(fis, flavor, das);
job.print(doc, pras);
Thread.sleep(10000);
System.exit(0);
Thank you
SumanaHere's a pure Java solution (that works!):
http://www.mycgiserver.com/~zhouwu/pdf/readme.html
The caveats are:
- prints only to the default printer
- requires a properties file located in the home directory
my workaround for the last:
* Print a PDF file to the default printer (might consume lots of memory!).
* <p>
* <b>Required:</b>
* <ul>
* <li>a file "acrobat.properties" needs to be in the working directory. The content is:
<table align="center" bgcolor="#E0E0E0" border=1 cellpadding="10" cellspacing="0"><tr><td><pre style="margin-top:0; margin-bottom:0">
#com.adobe.acrobat.Viewer Properties
#Wed Oct 29 20:34:05 PST 2003
com.adobe.acrobat.AcceptedLicAgreement=true
com.adobe.acrobat.Fax_Fine_Mode=true
com.adobe.acrobat.Find\:FindAll=false
com.adobe.acrobat.Find\:FindBackwards=false
com.adobe.acrobat.Find\:FindWholeWord=false
com.adobe.acrobat.Find\:MatchCase=false
com.adobe.acrobat.Open_Dialog_Directory=C\:\\temp\\
com.adobe.acrobat.Open_Dialog_File=itext.pdf
com.adobe.acrobat.Print_Method_Known=true
com.adobe.acrobat.Shrink_To_Fit=false
com.adobe.acrobat.SitePreferencesURL=file\://localhost/C\:/pdf/acrobat-site.properties
com.adobe.acrobat.Use_Print_Server=false
com.adobe.acrobat.util.fontDirectories=C\:\\Winnt\\Fonts
com.adobe.acrobat.util.fontIgnoreExtensions=.fon;.pfm;.ini;.lst;.txt;.doc;.ttmap;.z;.enc;.dir;.afm;.f3b;.pfa;.spd;.ps;.bepf;.map;.alias;.scale;.all;.upr
</pre></td></tr></table>
* <li>The JAR files PDFPrinter.jar, acrobat.jar and MRJToolkitStubs.zip in the CLASSPATH.
* </ul>
* <p>
* Note: the file "acrobat.properties" is expected to be in the user's home directory. As this is not always feasible,
* the system property "user.home" is mapped to "user.dir" for the time of execution.
* @param fileName Name of PDF file to print.
* @throws Exception on error.
* @see <a href="http://www.mycgiserver.com/~zhouwu/pdf/readme.html">PDF Server (Silent) Printing</a>
public void printPDF(String fileName) throws Exception {
String oldHome = System.getProperty("user.home");
System.setProperty("user.home", System.getProperty("user.dir"));
PDFPrinter vi = new PDFPrinter();
vi.activate();
vi.setDocumentInputStream(new FileInputStream(fileName));
vi.printAll();
System.setProperty("user.home", oldHome);
}//printPDF()I just need the following additional files in my CLASSPATH: PDFPrinter.jar, acrobat.jar and MRJToolkitStubs.zip. Despite the note at the site above that "printing quality is not very good", i can't agree: the print quality is quite good. Not perfect, but acceptable for most uses.
(Tested on Windows 2000 SP4, J2SE 1.4.2_03, hp laserjet 2300dn)
Maybe you are looking for
-
How to open/convert RAW- files from new CANON 5D Mk III in LR 3 and CS 5?
Hallo! The RAW- files from my new CANON 5D Mk III are not convertible into LR 3 and CS 5. What is the reason and how to solve the problem?
-
Production Order backflush does not occur
Hi Gurus, PLease help on the below issue. In my company, all the components in the production are using backflush. When GR the production order, the backflush will be automatic. Issue is we found one order did not backflush after GR. Other orders wi
-
HT201250 Is there any way to do a search iCal events in Time Machine backups using keywords?
Is there any way to actually look at what was in my iCal calendar, in calendar view, at the point in time of one of my previous backups? And if not, is there any way to search the iCal backup files to find the ones with certain entries? For example,
-
Change Service Name in Oracle10g
Can I change the service_names in Oracle10g database?
-
Does RH11 have a maximum limit on the amount of index words added to a topic?
I have received a request to add over 50 index words to a topic. I don't find it resonable but it is a client request. RH11 WebHelp