Printing multipage Word documents

I am trying to automate printing multipage Word documents.  If more than 1 page, I wish to automate the duplex function.  I can't seem to get a script that works.  If anyone has one and wishes to share or could direct me, I will be grateful.  Thanks.

The short answer is that the Java Print Service that comes with J2SE 1.4 does not contain support for MS-Word documents. I would be surprised if Sun ever offered support for anything from Microsoft. There is support for RTF some support in the J2SE for RTF (take a look at JEditorPane), which is a Microsoft standard, but that's about it. You might want to take a look at the POI project at http://jakarta.apache.org/poi/index.html There is support for working with a few Microsoft Office file formats there.

Similar Messages

  • Printing a Word document to pdf

    Is it possible to directly print a Word document to jpg through Adobe, or do I first have to print it to pdf and then save it as a jpg?

    Hi jmt111,
    It is not possible to convert Word document to JPG using Adobe Acrobat. You need to first convert the Word file to PDF and then you can save that PDF file to JPG (JPEG or TIFF or PNG).

  • Printing a word document

    Hi guys,
    How can I print a word document? Is there any examples that I can refering to?
    Thanks

    Hi,
    Jakarta POI can help you to solve your problem
    http://jakarta.apache.org/poi/index.html
    L.P.

  • Printing Microsoft word documents

    Does anybody know how to print MS Word documents in Java.
    I have been able to print normal txt files using Java Print Service in J2SE1.4.

    The short answer is that the Java Print Service that comes with J2SE 1.4 does not contain support for MS-Word documents. I would be surprised if Sun ever offered support for anything from Microsoft. There is support for RTF some support in the J2SE for RTF (take a look at JEditorPane), which is a Microsoft standard, but that's about it. You might want to take a look at the POI project at http://jakarta.apache.org/poi/index.html There is support for working with a few Microsoft Office file formats there.

  • HP Laserjet PRO MFP125nw doesn't print Microsoft Word documents from PC

    Hello.
    I've recently bought a brand new HP Laserjet PRO MFP125nw printer. The functions seemed really nice and the price was acceptable. I've brought it to my home, installed it following the manual, connected it to Wi-Fi etc. It generally works fairly well. PDF files are printed perfectly well, the scaning function works and it's generally a nice piece of technology.
    The only problem is that it just doesn't want to pring Microsoft Word documents from my PC. It prints it perfectly when I try to print .docx from my smartphone using the app, but it doesn't respond when I try doing it from the PC.
    My Office version is 2007 Enterprise. Do you have any idea what I should do?
    Thank you in advance

    Thank you a lot for a quick reply, Cbert. It's fantastic to see HP actually reading their forums and trying to help!
    I'll try plugging it into the wall and directly to the PC with a USB, we'll see if it works out.
    About Word, i've already tried reinstalling Word, even installed a 2003 version to check if it works with that. Well it doesn't. And as i've written before, I tried turning some .docx files to .pdf using a converter, but it still doesn't print them.
    Anyway, i'll try the first two points and keep you updated, thanks!

  • How to print a word document using java?

    Hi All,
    is it possible to write a java program that takes input and directs it to printer.
    I specifically want it for word document.
    i already have a program that works for images but not for word document.
    Plz guide me where i am wrong or help me with some links or code snippets.
    Any kind of help will be really appreciated.
    // program is below
    import java.io.FileInputStream;
    import javax.print.Doc;
    import javax.print.DocFlavor;
    import javax.print.DocPrintJob;
    import javax.print.PrintService;
    import javax.print.PrintServiceLookup;
    import javax.print.ServiceUI;
    import javax.print.SimpleDoc;
    import javax.print.attribute.DocAttributeSet;
    import javax.print.attribute.HashDocAttributeSet;
    import javax.print.attribute.HashPrintRequestAttributeSet;
    import javax.print.attribute.PrintRequestAttributeSet;
    public class Convert{
         * @param args
         Convert(){
              DocFlavor psFlavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
              FileInputStream fis = null;
              // Creates a new attribute set
              PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
              try{
                   fis = new FileInputStream("d:\\print\\new.txt");
                   System.out.println("doc taken...");
                   if (fis == null) {
                        System.out.println("No File");
                        return;
              }catch(Exception e){
                   System.out.println("No Such Doc..."+e);
              PrintService printService[] = PrintServiceLookup.lookupPrintServices(psFlavor, aset);
              //System.out.println("Default Printer: ");
              PrintService services = null;
              try{
                   services =     PrintServiceLookup.lookupDefaultPrintService();//ookupPrintServices(psFlavor, aset);
              }catch(Exception e){
                   System.out.println("print exp ");
                   e.printStackTrace();
              System.out.println("Default Printer: "+ services.getName());
              System.out.println(services+" services taken..."+services.isDocFlavorSupported(psFlavor));
              PrintService service = ServiceUI.printDialog(null, 250, 250, printService, services, psFlavor, aset);
              if (service != null) {
              DocPrintJob job = service.createPrintJob();
              try {
                   DocAttributeSet d = new HashDocAttributeSet();
                   // Doc doc=new
                        Doc doc = new SimpleDoc(fis, psFlavor, d);
                        System.out.print("doc prepared...");
                        System.out.println("printing starts...");
                        job.print(doc,aset);
                        System.out.println("printing done...");
              catch (Throwable pe) {
                   pe.printStackTrace();
         }else{
              System.out.print("else...");
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              new Convert();
    }

    anamupota wrote:
    JoachimSauer wrote:
    Desktop.print() is the simplest way. Everything else will get tricky really fast.I wonder if one could print .doc file though.Desktop.print() simply tells the OS to do whatever it usually does to print the file. If Word is installed, it should start word with the file as an argument and whatever parameter it takes to tell Word to print it.
    If you don't have anything installed that can view/print words files (or the correct entries are missing in the registry), then it won't work, of course.

  • HP PSC 1350 Series Printer will NOT print from the internet ~ but will print a word document.

    I have an HP PSC all-in-one PSC 1350 Series printer.
    the operating system is Windows XP to the computer it's USB connected to.  
    Earlier this week I was having troubles with the WIFI and IT helpers changed setting on the modem and the router. 
    Still wouldn't work, so a new router is being sent to me.
    To use the internet, I currently have the ethernet cord directed connected to the computer. 
    These past few days the printer worked both printing word documents AND print jobs from the internet.
    NOW IT WILL PRINT NOTHING FROM THE INTERNET.  (ex: email messages, invoices, statements etc)
    I've tried again after restarting the computer, unplugging and restarting the printer and still it won't work.
    The tiny printer icon appears briefly in the bottom tool bar, acting like it wants to print, but then nothing happens.
    Please advise. 

    Hi there,
    Try downloading and running the print and scan doctor located here:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03275041&cc=us&dlc=en&lc=en
    It can fix a lot on its own and if not give a better idea of what is going on.
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Cannot print in word document

    HI, I have a hp 3930 deskjet printer I cannot print in microsoft office,the printer seems to be printing but the pages are blank,  however my printer prints fine in internet explorer, I have windows xp sp3
    Can someone help pls?

    hello all,
    This sounds more like a Word document problem, what version do you have? If you can print from other applications, it must be the copy of Office that you have.
    I would recommend downloading Open Office, then test printing from there. It will print like Microsoft word for you and then you will see if it is your Office copy to blame or not.
    for all your commercial printing needs....brochure printing
    Message Edited by trhale99 on 05-26-2009 02:30 PM

  • When I print a Word document to a shared printer, print preview looks fine but the printed page has too much blank space at the top and doesn't print the bottom few lines.

    When I print a Word for Mac document to a shared printer (that is connected to my iMac) from my Macbook Pro, print preview looks fine but the printed page has too much blank space at the top and doesn't print the bottom few lines.  I have tried to adjust the margins and the page setup settings but to no avail.  It used to print fine until recently.  Is there a way to fix it so that the printer prints what print preview shows?

    I should add that when I e-mail this document to myself and print it directky from the iMac, it prints fine.

  • Printing a document from firefox web page or Microsoft Word doc ument used to work just fine. All of a sudden I was unable to print a Word document. I can still print a web page. Any suggestions?

    I have a document from Microsoft Word that will not print. It's as if the printer is not connected when I attempt with the Word document. I have gone in and deleted any pending documents in Microsoft Word. I have restarted computer, as well as the printer. The printer does not seem to be connecting or responding to the Word program (cannot find spooler) Any suggestions?

    I have a problem similar to those posted here, with one difference. With my printers newly installed, regardless of which one is selected as the default, when I try to print from Adobe Reader I receive the error message we're talking about : "Before you can perform a print related task...."
    Here's the fun part.
    If I click OK on the message, ALL MY PRINTERS GET DELETED and, I get the windows message that "Spooler subsystem app has encountered a problem and needs to close"! If instead of clicking OK I switch to Task Manager and end Adobe, I'm fine and can print from other programs.
    I can "reset" the problem by deleting the files in C:\Windows\System32\Spool\Printers and C:\Windows\System32\Spool\Drivers\w32x86, restarting the machine, and deleting then reinstalling the printers (which show up again after the restart).
    BUT, if I try to print from Adobe Reader again, I get the same cycle of problems.
    I am running Windows Vista and Adobe Reader 8.1

  • Cant print online word document

    I am having trouble printing an online word document. I have an HP C6380.
    When I click print the print queue shows as spooling but nothing ever prints.
    Can anyone help.
    Thanks.

    Hi,
    According to your description, I selected the situations which your said above.
    1. A lot of Domain account could print from is IE10 to Onenote, but IE 8 not.
    2.When Domain account print to Onenote, but it hanged.
    3. Word works well if runned as administrator.
    From above, I think the printer setting was Ok, beacuse you could print something by using Onenote to physical printer.
    As far as I know, OneNote stores a raster and a vector format for the printout images. It will first load the raster image (quicker to load) then quickly switch to vector image (hi res/sharper). The image you see for a split second is the raster
    image and then vector format fails to render. I believe you did not lose any data, just that it fails to render due to a configuration issue.
    OneNote uses .NET to render the vector format and I have seen cases where the installed .NET version or not installed .NET updates would be a problem. I recommend you first make sure you have
    Win7 SP1 and Office and .NET updates that show up in Windows Update are all installed and retry after that.
    And then,please check the link:http://www.onenote-tips.com/printfails.html, it may be help for you.
    If the issue exists, Please use process monitor to selcet the log when the issue occurs.
    Regards,
    George Zhao
    TechNet Community Support

  • Print MS Word document in background

    Hi gurus,
    Is it possible to print Word document in background using ABAP? If yes, which function module could be used?
    Thanks in advance,
    Franck

    Hi Rakesh,
    Thanks for your answer. Unfortunately, I don't think that it could help me though. My requirement is to print the document in background. The document is not on the presentation server. Other idea or exmplanation on how to make CV150_PRINT_DOC works will be greatly appreciated.
    Regards,
    Franck

  • Printing Multiple Word Documents?

    HI,
    I'm using Panther 10.3.9. How do I print a batch of MS Word .doc files ? I've created a desktop printer and when I drag a bunch of .doc files to it only one file prints! argh... I dragged a folder to the desktop printer and I got a directory listing ... double argh....
    Is it possible to do this? And is it possible to do this without seeing the print dialog each time ???
    Thanks,
    Pete

    Hi, Peter.
    I would also like to be able to print multiple documents straight from the Desktop by dragging and dropping or using a keyboard shortcut. It's been so long since I used OS 8 or OS 9 that I can't remember if I was dreaming or not, but I'm pretty sure that in the old OSes you could just drag and drop or click Cmnd+P and print away.
    I've tried using Automator to make an application (have'nt got the hang of it yet), using a desktop printer and searching for an Applescript on the net; all to no avail. It seems that Word behaves differently depending on whether it's open already and whether there is already a blank document open in it or not. That is, if it has to launch before printing, it opens a new, blank document and prints that (or sometimes does nothing even though the printer launches). However, if Word is already open (but has no other document open) it will print all the documents. As you say, though, you have to then select "print" from the resulting dialogue box for each document. So, it's hardly elegant. As someone said elsewhere, it's more of a "bug" than a "feature".
    So, what we need (as far as I can see) is an Automator appplication or workflow (or AppleScript) where 1. you drop a bunch of Word (or other) documents into a folder; 2. Word launches; 3. the new, blank document that automatically opens is closed (by some kind of "close all open windows command"); 4. the documents are sent to the current default printer;5. they all print.
    Surely all the publishers who use Macs must use this kind of thing all the time.
    I wrote to the guys at CocoaTech (who make Path Finder, an excellent Finder substitute) about this problem and they said they'd consider adding the feature, but at the same time seemed a bit confused about exactly what this feature was or why anyone would want to use it.
    Does anyone know of a solution to this?
    Cheers
    Matt
    iBook G4   Mac OS X (10.4.5)  

  • Printing a Word document from Memory Card?

    My C4250 is in a different room from my Win XP PC. If I copy & paste a Word document to a memory card, can I print the document without connecting the PC to the printer?
    If I can, how do I do it? 
    Thank you for your reply/help 

    Please specify what OS and the software version you are using and the exact error message you get.
    Are you trying to print to the local printer, network printer or virtual printer (Adobe PDF)?

  • Why can't I print a word document from my macbook pro

    Since the last software upgrade, I am unable to print from word. I can print from excel and ppt, but not word. I have re-installed the printer drivers after uninstalling them but it still doesn't work.

    If you have a macbook with internal or USB external Superdrive, insert disk, and an option appears for burning files.
    Otherwise drop the movie into a folder and click on the settings button of the folder and choose "burn .......to disk"

Maybe you are looking for

  • DVD-Player SPDIF output to Audigy 2 Plati

    Hello together ! Because of the bad sound of my TV speakers I want to connect my DVD-player via SPDIF-Out to my Audigy (the player has no optical out). But I only get some sound when I set the Player's output to "PCM". And then there's only stereo so

  • Mounting flash drives in  solaris failsafe mode

    Hello all, Suppose our system has crashed and we cannot login in solaris normal mod. But we need the data. I have done the following exercises to take the back up of the file system. 1:- logged in fail safe mode. 2:- mounted the file system in to a m

  • Adding keywords to multiple photos

    Any idea how to make this work better? I know it's possible in the "keywords" window but that's not very usable when you have 700 different keywords. I really miss the Keyword Assistant...

  • How to get value of yes/no on dailog page

    All . Quick question right now the delete button delete's when the trashcan is hit. so I am adding a oadialog page ( code between _________________) to get a confirmation to proceed. i have the dialog page working. when delete button hit, confirmatio

  • How to find the corresponding programs for a particular condition type

    Hi experts, I have one condition type( KSCHL ). I need to find the programs where this condition type is used. Thanks in Advance.