Printing a HTML dokument ?

Hi!
How do i print a HTML dokument from Labview witout opening Microsoft
Explorer ?
BR Per

mxller;
You might be able to do so using "System Exec.vi". The following may vary from computer to computer:
You need to send "System Exec.vi" the following command:
rundll32.exe C:\winnt\System32\mshtml.dll,PrintHTML "C:\path\to\file.html"
This work in a machine with Windows NT. I don't know about Windows 9x/ME/2000 etc. Always check for the correct path for your computer. Unfortunatelly, when I test this, it opens the print dialog instead of just printing the file.
With Netscape it can be easier. The command is something like:
C:\PROGRA~1\NETSCAPE\COMMUN~1\PROGRAM\NETSCAPE.EXE /print("C:\path\to\file.html")
Again, check the path. I tested and in my case it send the file directly to the default printer.
If I find out something else, I'll p
ost it here. Let me know if this work.
Regards;
Enrique
www.vartortech.com

Similar Messages

  • How can i get rid of the print dialog box when using api to print an html file

    i am using the systemshell.vi provided by labview the VI is working fine but it will open a dialog box for printer selection and properties. i would like to hide that dialog box and have it print to the default printer with the default properties

    ShellExec is part of lvwutil and merely calls a function in Shell32.dll. There is nothing about the function call that controls the display of the printer dialog. I think that what shell32.dll does when it prints (just like right clicking on the file) is print the file according to what is defined about that file type in Windows Folder Options. On my Win2K system, the print application is defined as "C:\Program Files\Microsoft Office\Office\msohtmed.exe" /p %1. If I remove the /p, then Word starts up and in order to print, I get a printer dialog when choosing Print from the File menu. So it seems like the printer dialog is entirely dependant on the application that does the printing. I get no dialog when I use the VI to print a .txt file. I
    nstead of using shell32, you might want to try some ActiveX method or property of an application like Internet Explorer that can open and print an html file.

  • Is there a way to print a Html-Report direktly in LabView?

    I created a Html-Report wich includes a jpg-Picture.
    Actually there is no way, in the Report Generation, to Print a Html file. I Would be
    glad if you have a solution (sub-vi?) to Print a Html file directly in Labview.
    Thanks
    PH!L

    You can drive IE with Lv through ActiveX: When you have creating an IE
    ActiveX reference with Lv, you will be able to open your file and then print
    them programmatically...
    "PH!L" a écrit dans le message news:
    [email protected]..
    > I created a Html-Report wich includes a jpg-Picture.
    > Actually there is no way, in the Report Generation, to Print a Html
    > file. I Would be
    > glad if you have a solution (sub-vi?) to Print a Html file directly in
    > Labview.
    > Thanks
    > PH!L

  • How to print a html report?

    I have LV 6.1 pro and I want after succesfull generate of html report
    print them. How?

    If you want to print the HTML report, you'll have to use ActiveX to open the resulting report with your web browser and then tell the browser to print it. Of course if you are wanting to print it, why are you using HTML? Why not generate it as a standard report? Or do both--one for printing and one for online publication.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How can I print a html table and preview it?

    Hi there!
    Please help me.
    I spent a lot of time to find how to print a html table and preview it.
    I tried use code of the book http://www.manning.com/sbe/ Chapter 22. But this book consists only code for rtf and they change size of JtextPane before printing.
    I have found the bellow code;
    http://forum.java.sun.com/thread.jsp?thread=120578&forum=57&message=316116 But I problems with printing.
    I also found this code; http://forum.java.sun.com/thread.jsp?forum=31&thread=146439
    But there is no code,so i don't understand.
    Can u help me?
    Thanks my friends.

    There is the comp.lang.javacript newsgroup for one:
    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&group=comp.lang.javascript
    Here are a couple of more candidates I found from google in about two minutes:
    http://www.jguru.com/forums/home.jsp?topic=JavaScript
    http://www.jsworkshop.com/bb/viewforum.php?f=1&sid=524b20160ca47c0ab786214e2003f1d1
    http://javascript.internet.com/forum/
    I am sure there are many more. :)

  • How can I print a html Using javax.print

    Hi friends,
    I am in big trouble . I use following code to print a html file using javax.print api.
    import java.io.*;
    import javax.print.*;
    import javax.print.attribute.*;
    import javax.print.attribute.standard.*;
    import javax.print.event.*;
    public class PrintPS
         public static void main(String args[]) {
              PrintPS html = new PrintPS();
         public PrintPS() {
         DocFlavor flavor = DocFlavor.INPUT_STREAM.TEXT_HTML_HOST;
         PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
         aset.add(MediaSizeName.ISO_A4);
         aset.add(new Copies(1));
         aset.add(MediaTray.MAIN);
         PrintService pservices = PrintServiceLookup.lookupDefaultPrintService();
         if(pservices==null)
              System.out.println(" printer not found");
         if (pservices!= null) {
         System.out.println("selected printer " + pservices.getName());
         DocPrintJob pj = pservices.createPrintJob();
         try {
         InputStream fis = new FileInputStream("abc.html");
         Doc doc = new SimpleDoc(fis, flavor, null);
    System.out.println("printing started ");
         pj.print(doc, aset);
    System.out.println("printing completed");
         } catch (IOException ie) {
         System.err.println(ie);
         } catch (PrintException e) {
         System.err.println(e);
    This code gives me "sun.print.PrintJobFlavorException: invalid flavor"
    So i use all four TEXT_HTML flavor but i do not find the solution.
    I am able to print pdf, jpg, gif files but i can not able to print txt and html file.
    My printer supports txt and html printing becaue i do printing directolly by browser's or notpad's print command .

    Hi friends,
    I am in big trouble . I use following code to print a
    html file using javax.print api.Use Code Tags
    http://forum.java.sun.com/help.jspa?sec=formatting
    My printer supports txt and html printing becaue i do
    printing directolly by browser's or notpad's print
    command .Notepad & your browser prob. convert to the HTML/text(1) into the printers native format.
    1) I am suprised that it does not print text.

  • Print JSP/HTML Pages (perhaps PDF?)

    Hi,
    i have a table in HTML generated by JSP.
    Just like the following simple example:
    ...<table>
    <%
    for( Enumeration et = free.getSqlIDs().elements(); et.hasMoreElements();)
    String keyt = (String)et.nextElement();
    Bean b = new Bean();
    b.init(path,DB);
    b.setID(keyt);
    b.restore();
    %>
    <tr>
    <td>
    <%out.print(b.getName());%>
    </td>
    <td>
    <%out.print(b.getAdress());%>
    </td>
    </tr>
    %>
    </table>...
    No i want to give a button to the user. When pressed, the HTML-Page should transform to PDF.
    With such a method i want to print the HTML-Page.
    I Know that this is possible with the help of XML/XSP and a stylesheet. But i like to do that with this way:JavaBeans-->JSP-->HTML-->PDF
    Anyone a solution, some code examples for me?
    Or perhaps another solution to print HTML-Pages in a fine design?
    Thank you for your help
    Andy

    Hi,
    no one any idea?
    How do you print Jsp Pages?
    Thank you
    Bye
    Andy

  • Script to print an html page in both sides (duplex printing)

    Hi,
    I have a website that can print page automatically without showing the print dialog box. Now, user's have requirement to print the page in both sides.
    Is there any vbscript/javascript that will auto print the html page in both sides (duplex)
    Thank You!

    Hello,
    This should be asked in Microsoft's ASP.Net forums:
    http://forums.asp.net/
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?&lt;=\G.{2})'|%{if($_){[char][int]&quot;0x$_&quot;}})

  • Printing a HTML page in a JTextPane

    Hi all..
    I nned to develop a report generating system for one of the softwares that I am writing and I am planing to generat the report as a HTML page (both text and images) and users can preview them on a JTextPane and can save to disk as html files for further use.
    I also want to add functionality to the application to print the report through java.
    what I want to do is to print what is displayed in JTextPane (Content Type: text/html)
    I am familiour with Printable interface what I cant figure out is how to make the JTextPane printable and how to send the data in JTextPane to printers Graphic object
    Can somebody give a sample code for this.
    Also if you know any other way of printing a HTML formated text without use of any other componant like JTextPane please tel me how to do it.

    We had done the same using the JEditor Pane and later print the JEditorPane using the print API..
    Here is the code to include the html file.
    mainPane = new JEditorPane("file:///C:/project/JavaPrintingAPI/AddGlobalProduct.html");
    mainPane.setEditable(false);If it work... hungry for yummy dukes... :-)

  • Printing XLS, HTML, or RTF using Apache FOP

    Hi,
    Is it possible to print XLS, HTML, or RTF reports using Apache FOP? If not, is there another open source or free print server that will do this?
    Thank you.
    Martin

    Hello,
    >>
    Your going to want to study the Cocoon sitemap concept to see how to pipeline the xml and xsl to the right output.
    >>
    To get this working correctly you need to understand the Cocoon sitemap concept and how to read data out of the XML file your posting in order to pipeline it to the right rendering format. It's pretty much a hands on affair so it depends on what your trying to do, sorry there is no easier way to do it.
    In a future versions it will be easier to do this as you will be able to select specific end points per report.
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • Printing a HTML doc from a JEditor Pane

    I would like to print a HTML page from a JEditorPane. I've searched trhough the web, but haven't found any free libs yet... Does anybody have some tips?

    See
    JEditorPane.setPage(URL)
    once you've done that and its rendered you should be able to print by using my StandardPrint class. Search for StandardPrint.java on this site

  • Problem Printing an HTML Sprite

    Hi,
    In an AIR app with an HTML Control (Sprite) - I want to print
    the HTML.
    If the HTML content is to large for the sprite (i.e. there
    are scroll bars) then only the visible content is printed.
    Is it possible to ensure the entire HTML content is
    printed???
    Thanks

    // Must set the content type first
    res.setContentType("text/html");
    // Now we can obtain a PrintWriter
    PrintWriter out = res.getWriter();
    out.println("<html><head><title>Hello World!</title></head>");
    //out.println("<body><h1>Hello World!</h1></body></html>");
    out.println("<body><h1>");
    out.println(defaultGreeting + " " + defaultName + "!");
    out.println("</h1></body></html>");
    This is to be done inside a servlet

  • Print an HTML string as normal text

    Hello,
    I have a simple html file with couple of lines in it.
    I want to use the Java API to print this HTML string as normal text output.
    Here is the program tht I have written:
    This program compiles but doesnt give the required output.
    Any suggestions:
    package test.print;
    import java.io.*;
    public class printHTML
    public printHTML()
    public static void main(String[] args)
    printHTML printHtml = new printHTML();
    File htmlFile = new File("C:\\Jayashree\\Examples\\printHTML\\testPrint.html");
    System.out.println("File name:" + htmlFile);
    printHtml.print(htmlFile);
    public void print(File htmlFile)
    try
    // PrintWriter out = new PrintWriter(new ByteArrayOutputStream());
    PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(htmlFile)));
    System.out.println("Print Writer object:" + out);
    out.println(htmlFile);
    out.flush();
    out.close();
    catch(Exception e)
    System.out.println("Exception:" + e.toString());
    e.printStackTrace();
    Further, if i have an file with strings like
    <html> this is a test html page </html>
    How do i print the string as normal text without the tags?
    Thnx in advance!
    Regards,
    Jayashree

    what is that u want
    the code below worked fine for me
    package com.test.io;
    import java.io.*;
    public class IOTest  {
      public IOTest() {
      public void print(File htmlFile) {
        try {
          PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(htmlFile)));
          out.println("<b>is this the desired result</b> or is this the one <i>what about this</i>");
          out.println("<table border=\"3\"><tr><td>there is some info here</td><tr></table>");
          out.flush();
          out.close();
        catch(Exception e) {
          System.out.println("Exception:" + e.toString());
          e.printStackTrace();
      public static void main(String [] args) {
        IOTest io = new IOTest();
        File htmlFile = new File("C:\\TEMP\\testPrint.html");
        io.print(htmlFile);
    }

  • LabVIEW 6i crashes when trying to "Print To HTML"

    My application (not compiled as an executable, still in editor mode) crashes LabVIEW on run. I recieve the pop-up that an error log is being created. Contained in that log are the following sections:
    Application exception occurred:
    App: (pid=556)
    When: 7/11/2002 @ 13:39:20.865
    Exception number: c0000005 (access violation)
    *----> Stack Back Trace <----*
    FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4 Function Name
    0012F240 0071BB57 00000000 011D46E4 0012F360 0012F6D0 !LVSetDefaultPrinter
    0012F364 0071843B 00000558 0012F6D0 011D28C0 011D28F0 !VIPrintPanelToPrinter
    0012F6A4 00428040 0000021C 0012F6D0 011D28C0 011D28F0 !VIPrintPanelToPrinter
    0012F81C 004273D0 00000001 011D3EF8
    011D28C0 0012FA50 !VIRefFinishNativeCall
    0012FB70 004259E4 00000000 00000001 00000007 02C0F774 !VIRefFinishNativeCall
    0012FCA4 004719C6 ECB00000 000003EE 00000007 02C0F774 !KillLVObjAsyncRef
    0012FDDC 00522C2B 02C0F800 00000001 02C0EB20 00000000 !CBRPrepareCall
    0012FDF4 02C2187D 011D0278 00000000 00000006 00000001 !PrimPostEvt
    02C0E800 00925E0C 011E6CA0 002FB510 011D4208 011D31D8
    02D67C5C 0048EA10 0048EA50 02C25C82 02C25F9E 02C25F3F !
    0048DF70 8B5310EC 8B560C5D 438B0875 FF335708 850FF03B !VINormalInitCProcsHelper
    83EC8B55 00000000 00000000 00000000 00000000 00000000
    The only printer related funciton in my application is "Print To HTML."

    Although this does tend to point to the function where your application prints, I wouldn't trust the message.
    What you need to do will be time consuming, but will be necessary to troubleshoot your application.
    In iterative steps, perform the following:
    Open your VI's diagram.
    Place the VI in Highlight Execution Mode.
    Run the main VI and watch the diagram in question for the node that causes the whole mess to crash.
    Once you have isolated the node, unless it isn't a subVI, open the subVI, and repeat these steps until you find a node that isn't a subVI (a native function).
    This will isolate your problem to the precise node that is causing the problem. From there, you can probably figure out what is going on, or either post the information here, o
    r contact NI support (ni.com/ask).

  • How to print an HTML from an Applet ?

    I have a html file which has some images (<img></img> tag ) and some static contents.This html is generated by a Servlet.Currenlty i am doing a browser print. I do not want the print dialog box to appear.
    Is it possible to print this using an applet ? Using java print ?
    I am able to print a image from an applet using java print.
    But i am not able to print a html with images and text.
    Is there any way to convert such html into a image(jpeg,bmp) using java api ?

    I tried the Java printing API in 1.4.2 but found it hopeless in terms of printing anything without using AWT.
    Also since the print service was going to be on Windows machine I used jawin (http://sf.net/projects/jawinproject/) to query the registry for the command to print a particular extension and then exec that command.

Maybe you are looking for

  • URGENT FIX MY Connect Four game for Wednsday PLEASE HELP

    I am using an APPLET and i want to use JOptionpane it didnt work when i used it in the paint method. So i want to make a runner to make the program work. I don't know why the Graphics g = new Graphics isnt working PLEASE HELP. Email the revised code

  • How do I download Mac App Store to my MacBook Pro. Somehow, it was deleted

    Somehow, Mac App Store has been deleted from my MacBook Pro (Mac OS X version 10.6.8) How do I download this back to my MacBook Pro?

  • Deployment of SAP mappings

    i have created numerous mapping in OWB to extract, transform and load data from SAP tables. this of course includes dimension and fact data. i understand that they are ABAP mappings so ABAP source code and an SQL Loader control file will be created f

  • Exporting Tabular Form to Excel

    Hi all, i create a tabular form on a table and i update only one field that can assume value of Y and N so i use a LOV with definition Si;Y,No;N my need is to export this in excel ( CSV ) but this error messages are raised: ORA-06550: line 1, column

  • Automatically create albums based on rolls?

    My iPhoto photos are very well arranged by rolls. However, there isn't a way in other iLife programs or Front Row to browse by rolls. Is it possible for iPhoto to automatically create albums for each imported roll (with Automator or otherwise)? Thank