How to print DOC or PDF files

Hi all,
please tell me how to print documents (.pdf , .doc , .xls , .jpeg, .gif, .bmp) with java coding
i have tried like this ..
try {
//          Open the input file
          InputStream is = new BufferedInputStream(
          new FileInputStream("C:\\Documents and Settings\\3041\\Desktop\\New Folder (2)\\00.pdf"));
          PrintService service = PrintServiceLookup.lookupDefaultPrintService();
          DocFlavor[] flavors = service.getSupportedDocFlavors();
          for (int i = 0; i < flavors.length; i++) {
               System.out.println(flavors.getMimeType());
//          Create the print job
          DocPrintJob job = service.createPrintJob();
          Doc doc = new SimpleDoc(is, DocFlavor.INPUT_STREAM.PDF, null);
//          Print it
          job.print(doc, null);
          is.close();
          } catch (PrintException e) {
          System.out.println (e);
          } catch (IOException e) {
          System.out.println (e);
which prints all images properly but not doc or pdf files please help how to print PDF or DOC files
Edited by: getzkk on Oct 8, 2007 7:31 AM
Edited by: getzkk on Oct 8, 2007 4:02 PM

Well, the ability to convert the pdf to html and then to PDF is a worthy solution.
10,000 emails would require a batch convert solution.
This is very much beyond what I know. I'll have to leave this to better minds.
I could suggest a third party tool. Have a look at this:
http://a-pdf.com/faq/can-i-split-pdf-file-with-nonstandard-page-size.htm
Other than that,I can't think of anything else.
Gene

Similar Messages

  • How to "print" to a PDF file using several templates?

    I have Adobe Acrobat X Professional.
    Now I want to export my documents (letters, bids, invoices etc. from my ERP) to PDF files using the Adobe PDF printer driver using different layout templates for example: we have two different letterheads (already PDF files) and some of the documents have to be exported/merged onto the first, and others have to be exported/merged onto the second letterhead.
    Are there any options on how to select different templates in the Adobe PDF printer.
    And if not, are there any solutions how to integrate this functionality into Adobe PDF printer.
    Any help is greatly appreciated
    Cheers,
    Harald

    ok, that's right. i also can use the add layer command to create the text over the letterhead.
    but this is impractical. the users should be able to export the document using the desired template.
    i need a superimpose feature or something like that for the pdf writer. hopefully it will be implemented
    Thanks anyway.
    Cheers,
    Harald
    Message was edited by: harlam2k11

  • How to store .doc and .pdf files in oracle

    pls anyone give me exact procedure for storing .doc & .pdf files in oracle table data types etc...

    See here for an example
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:232814159006

  • How can I prevent a PDF file from being copied, printed or downloaded? Students should only be able to view the text and and not distribute it in any way.

    How can I prevent a PDF file from being copied, printed or downloaded? Students should only be able to view the text and and not distribute it in any way.

    You can prevent it from being printed by applying a security policy to it
    in Acrobat. The rest can't be prevented, unless you spend  a LOT of money
    on DRM protection.

  • How do i convert a pdf file to a microsoft word doc

    how do i convert a pdf file to a microsoft word doc

    Please see our Getting Started guide for ExportPDF: http://forums.adobe.com/docs/DOC-2412

  • How do i convert a pdf file to a word doc in order to make changes

    How do I convert a pdf file into a word doc in order to make chnages?

    You need Acrobat and can then use File --> Save As... --> Microsoft Word. Just don't expect miracels. PDFs aren't meant for editing and you may end up with clumps of text and lose all formatting and may have to rebuild the document completely.
    Mylenium

  • How do I convert a pdf file to word.doc?

    How do I convert a pdf file to word.doc?

    Hi patsy
    If you purchased ExportPDF (for converting PDF files to Word or Excel), check out Getting Started with ExportPDF for easy-to-follow instructions.

  • I purchased Pro so I can edit my pdf doc and it still won't let me edit it. How do I edit my pdf file?

    I purchased Pro so I can edit my pdf doc and it still won't let me edit it. How do I edit my pdf file?

    You say it won't let you edit it. What do you mean
    * You don't know how
    * The can't find the tools you expect to find for editing
    * You know how to edit, but you can't select text to edit at all
    * The tools are there but greyed out
    * You get an error message (what?)
    * Something else?

  • 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."

  • How do I merge 2 pdf files into one file?

    How do I merge 2 pdf files into one file?

    I use PrimoPDF (free download) to create pdf files. To merge two docs/pdfs/etc., print the first to a new pdf using Primo. Close it, then print the second and save it to the same new pdf. Primo gives you the option to 'append' or 'overwrite' the original file. By using 'append', you are just adding it to the back of the existing file. You can do this repeatedly to resort or combine existing pages into a new pdf.
    Also, I'm using Adobe Reader X.

  • [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.

  • How do i edit a PDF file that was sent to me in an email?

    How do i edit a PDF file that was sent to me in an email?

    Depends on the extent of the edits. You will need Acrobat in any case. If the edits or minor, you can use the text edit tool. For major edits, you need to request the original file be sent or see if you can Save As a DOC or related file type. PDFs are not really structured for editing and you are asking for a lot of grief if you want to do much. Exporting is the best way, or even better simply asking the author for the original (non-PDF type).

  • How do I convert a pdf file to photoshop?

    how do I convert a pdf file to photoshop?

    unless you understand what you're doing and why, opening .pdf in Photoshop is a very risky move
    because any vector objects, including fonts, will be pixelized (rastered at the chosen document ppi)
    this really sucks if the designer delivered a professionally packaged PDF with vector elements because the vector will not print vector sharp
    for example
    a moron at a print shop drags PDF business cards or posters into Photoshop and prints pixelized vector objects -- when you ask why the vector didn't print sharp -- they are clueless
    you also may hit profile issues that change the designer's color
    there must be 50 ways to ruin a project (and 25 of them are downstream)...

  • How does I resize a pdf file page using Acrobat Pro?

    In Acrobat Pro, how can one resize a pdf file page (21.38'' x 26.75'') into one measuring 6'' x 9'', to be submitted as the trim size? Is there a feature that allows this to be done? How does one set all print options from the Application print dialog box to enable one to adjust the dimensions of any customized file page?

    I want to scale the 21.4'' by 26.8'' content down to one that can be fitted inside a 6'' by 9'' book.
    I have this pdf that was created from the InkFlow app, and I'm using Acrobat Pro to merge three files into one (about 300MB), which I needed to submit to Amazon's CreateSpace, but they needed the trim size of 6'' by 9'', while the pdf is 21.4''' by 26.8'', and I can't amend the source file size of the InkFlow files.
    I tried fiddling with the Crop and Print options, but I'm unable to resize the pdf to match the trim size. The problem on my side isn't so much on printing but to resize the pdf file page to 6'' by 9'' to satisfy Amazon's requirement for their trim size. Could this be done with Acrobat Pro? The message that appears is: Full print options of Acrobat Pro, set all print options from the Application print dialog box. Thank for the help.

  • 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?

Maybe you are looking for