Print to PDF document in mhtml format

I have an mhtml file.  Can this be converted to a PDF using print file to PDF?

Just open the file in Internet Explorer and proceed as normal.

Similar Messages

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

    Here'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)

  • Printing a PDF document using SMARTFORMS

    What is the easiest way to print a PDF document from an ABAP program?  I have the data in the following formats:
    Binary (XSTRING)
    String (from function module HR_KR_XSTRING_TO_STRING)
    OTF
    What format can I use in a smartform to print the PDF in the background?
    Thanks in advance.

    Sandipan,
    If I use the UTF format, what do I use for the device type?  PDF1?  Also, I have the OTF data in an internal table which has to fields (TDPRINTCOM and TDPRINTPAR).  I pass this table into the smartform function module but what do I do with the 2 fields when I loop through the internal table in the smartform?  Do I just output a text node with TDPRINTPAR and ignoreTDPRINTCOM?
    TDPRINTCOM   TDPRINTPAR
    ==========    ==========
    //             XHPLJ4       0700 00000000001
    IN            04E/ERPIS/CARRIERLABEL
    IN            05%PAGE1
    OP            DINA4   P 144  240 1683811906000010000100000
    IN            06MAIN
    IN            03TABLE_BEGIN
    MT            0141701657
    CP           41030000E
    FC           COURIER 120  00144 SF012SF012410300144E

  • How can I print a pages document in book format ..order?

    How can I print a pages document in book format ..order?

    This is usually a function of the driver you're using. Have you looked in the various PDEs for black and white or grayscale? What kind of printer are you using?

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

  • 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! 
    Matt

    I 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 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 d

    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

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

Maybe you are looking for

  • R12 reports in XMLP

    Has anyone tried to take a report like the XMLP Purchase Order in R12 and run it in 11.5.10? Does it work? Did you have to change it? Did you learn from it? Thanks Dave Las Vegas

  • Bapi for createing purchase order

    Hi, when i'm creating PO by BAPI        BAPI_PO_CREATE1 given error message is comming No instance of object type PurchaseOrder has been created. External reference: PO header data still faulty can any body help me out. thanks mukesh

  • Install Java 2 SDK 1.4.2  on a D: drive

    I have a student trying to instal the SDK. He has partitioned his drive and his C drive has unsufficient space. When he changes the drive to D, the installation software still attempts to install on the C drive and reports insufficient file space. Ca

  • Split the text of an SQL query

    I'd like to make the following : transform the text (SQL code) of an SQL query into its components... here is an example of what I need : <cfsavecontent variable="my_query"> SELECT one, two, three FROM table1 WHERE one = 'yipee' or two = 'hi' group b

  • Planned order /dependncy deletion

    Hi FRIENDS, In md04 screen,There is pending of planned orders,purchase requisitions,dependancy I wish to delete the same.Pl.help Regards Sandy