Print a file to printer

Hi,
I have a peculiar requirement .. I have a file on the desktop (text based file), which should be directed to printer, when I click a button which is there in Forms (forms 10g).. In when button clicked, what's that I have to write ? I dont want to use HOST or PRINT (DOS) commands ... The printer is connected to my PC
Early reply is appreciated
Regards

Hi,
Thanks for your reply .. But, how ? Do you have or know link which can show me how to use webutil and client_host ?
Please help
Regards

Similar Messages

  • Print a file to printer wirelessly and without need to use CD drive to install driver?

    I have a HP-P1006 printer in my conference room and sometimes my guest want to send print to my printer and I have to connect their laptop with USB cable to my printer and install printer driver thought CD Drive. I want to know if there is a way to print a file to printer wirelessly and without need to use CD drive to install driver? (I don't have a wireless network in my conference room) 

    Is it possible to automate Adobe Reader to load files, then set the staple property and location, then print them out? I've seen in .NET 3.0 that there is a Enumeration for Stapling in the System.Printing Namespace. I need to figure out how to automate the printing in adobe but right before it prints, have .NET assign the printer and whether it should be stapled or not.

  • Printer 3510 not working witn windows 8.1 goes to print to file not printing

    IN installed the new driver from the hp website which is supposed to fix the print  problems since  the upgrade to windows 8.1. Now when I  tell the computer to print, it looks like it will print, but it goes to print to file and tries to save the document rather than print it. I have no idea what to do.

    Hello kcgphd,
    Welcome to the HP Forums.
    I see that you are having some printing issues when connecting the printer to your Windows 8.1 computer.
    I have a few suggestions that we can try in the attempt to troubleshoot this issue.
    First off, please make sure that you have the printer power cable connected directly to a wall outlet and not a power bar/strip. Here is a document that uses a LaserJet printer as an example but it is meant for HP products in general. Please click on the following link that explains the Issues when Connected to an Uninterruptible Power Supply/Power Strip/Surge Protector.
    If you have the printer connected to the computer with a USB cable, please remove it from the printer and the computer and leave it disconnected until further notice.
    The next step that I suggest we go through is Uninstalling the Printer Software.
    Once the uninstall is complete, please restart the computer.
    When the computer is back up and running, please click on the following for the HP Deskjet 3510 e-All-in-One Printer Full Feature Software and Drivers.  Please save the download to the Desktop so that it creates its own icon.  This will make the download easy to find.
    Double click the new icon and follow the instructions.  The installation will let you know when to connect the USB cable.
    If the troubleshooting does not help resolve your issue, I would then suggest calling HP's Technical Support to see about further options for you. If you are calling within North America, the number is 1-800-474-6836 and for all other regions, click here: click here.
    Thanks for your time.
    Cheers,   
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • Printing HTML file to printer

    Hi,
    I'm getting
    sun.print.PrintJobFlavorException: invalid flavor
    at sun.print.Win32PrintJob.print(Win32PrintJob.java:327)
                InputStream is = new BufferedInputStream(new FileInputStream("temp.html"));
                PrintService service = PrintServiceLookup.lookupDefaultPrintService();
                DocPrintJob job = service.createPrintJob();
                DocFlavor flavor = DocFlavor.INPUT_STREAM.TEXT_HTML_UTF_8;
                Doc doc = new SimpleDoc(is, flavor, null);
                job.print(doc, null);
                is.close();Or, how do I print HTML code (generated on the fly, not from any file) to printer?

    Whether you can depends on what the printer you're using is capable of. The chance of it working is small, tho. Run this pgm and see what your default printer will accept.
    import javax.print.DocFlavor;
    import javax.print.PrintService;
    import javax.print.PrintServiceLookup;
    public class DocFlavorLister
        public static void main(String args[])
            PrintService service =
                PrintServiceLookup.lookupDefaultPrintService();
            System.out.println(service + " supports :");
            DocFlavor[] flavors = service.getSupportedDocFlavors();
            for (int i = 0; i < flavors.length; i++)
                System.out.println("\t" + flavors);

  • Can't "Print multiple files" or "Print bin files"

    I had PSE6 installed on my 'old' PC and never had any problems. Then I had my PC upgraded and now I can't print multiple files from the editor or organiser. The photos appear but have a red circle-like icon in the top-left of the thumbnail.
    I can print single photos from the editor. I have updated my printer driver with no change. The printer works fine from other applications.
    I know this is possibly not a PSE6 problem, but would appreciate any light that can be shed on fixing this problem.
    I am running on XP Pro (was on SP2 before but new system has been installed with SP3)
    Thanks in advance.
    Leonie

    Barbara,
    Thanks for replying! I am using a Mac (OS 10.5 and Photoshop Elements 6)
    I went to one of Adobe's help pages and tried to follow the instructions below so that I could print multiple photos on one sheet. However, I cannot find any "Organizer" or "Editor Print" dialog box in my Photoshop Elements software. Plus, I do not know what "Photo Browser" or "Date view" are. And the "Remove" button does not seem to be available.
    The guide appears to be of no help, and I am currently lost. Are the directions below not for a Mac? Is there a book I should buy for Mac?
    Bruce
    Print multiple photos
    You can print multiple photos using the Print dialog box in the Organizer. You can access this dialog box from the Editor Print dialog box.
    1. Do one of the following to open the Print Selected Photos or Print Photos dialog box:
    In the Photo Browser or Date view, select one or more photos, and choose File > Print.
    In Full Edit, Quick Fix, Guided Edit, or any other workspace mode, open the photos you want to print and choose File > Print Multiple Photos.
    2. To add more photos, click the Add button .
    3. To remove a photo from the print list, select its thumbnail and click the Remove button .
    4. Choose Individual Prints from the Select Type Of Print menu.
    5. Choose a print size for each photo from the Select Print Size And Options menu. Click the forward and back buttons to see each page of the print job.

  • Unable to print to file on PRINTER HD

    I have an Oki C7300 printer which has a built in hard drive. Before upgrading from OS 9.x to Panther (now 10.3.9) it was possible to print PS files directly to the printer's hard drive. Now it isn't. Oki support tells me that Apple dropped support for that option, though the Apple printer setup utility provides check boxes for installed options (memory, duplex and HD). Why would they allow selection of the options, but then not provide the means to utilize the option??!!
    Latest "driver" files from Oki are installed, and the Apple printer utility recognizes the printer and the options. But nowhere can I find in the print menu screens or drop downs anything about printing to the PRINTER'S hard drive.
    Perhaps I have missed something. Has anyone else run into this problem, or a reasonable work-around?

    Your Printer folder needs to be located in the Applications folder and double clicked and opened there. All the drivers all need to be placed in this same folder before you open them. Restart your computer and try your printer again....Good Luck...Don

  • How to print *.PRN file without print Dialog from Java

    hi friends
    I need to print *.PRN file from java code.*
    I need to print directely without open printer dialog box when i select .PRN file then it should able to direct print to default printer.
    Here is the Dos command to directely print the PRN file
    COPY C:\\PrintFile.prn /B \\java103\\HPLaserJ
    (source: http://filext.com/faq/print_from_prn_file.php)
    i try to run that dos command through Process p = Runtime.getRuntime().exec("COPY C:\\PrintFile.prn /B \\java103\\HPLaserJ");
    But is show that
    Here is the LOG of ERROR
    \\java103\HP LaserJet M1120 MFP
    java.io.IOException: Cannot run program "COPY": CreateProcess error=2, The system cannot find the file specified
         at java.lang.ProcessBuilder.start(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at Print2Printer.GetDefaultPrinter.main(GetDefaultPrinter.java:17)
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
         at java.lang.ProcessImpl.create(Native Method)
         at java.lang.ProcessImpl.<init>(Unknown Source)
         at java.lang.ProcessImpl.start(Unknown Source)
         ... 5 more
    Here is the Source
    import java.io.IOException;
    import javax.print.PrintService;
    import javax.print.PrintServiceLookup;
    public class GetDefaultPrinter {
         public static void main(String args[]){
              PrintService printer = PrintServiceLookup.lookupDefaultPrintService();
              System.out.println(printer.getName());
              try {
                   Process p = Runtime.getRuntime().exec("COPY C:\\PrintFile.prn /B \\java103\\HPLaserJ");
                   System.out.println(p);
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();

    you need to specify which program you want to execute in Runtime.getRuntime().exec(). So try this one
    try {
    Process p = Runtime.getRuntime().exec("cmd.exe COPY C:\\PrintFile.prn /B \\java103\\HPLaserJ");
    System.out.println(p);
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }

  • Problem with printing from file to printer

    I've been having problems printing more than one page of text from a file to a specified printer in addition to the fact that the number of pages the print dialog says are to be printed is always 9999! I have tried overriding functions from Pageable too, which gave me problems. I tried making the pageIndex more than one page, but it just prints out blank pages after the first, even if there is more data in the file that should have been printed. Here is my code, and if someone could give me some helpful advice I would very much appreciate it! (Thanks in advance for your advice!)
    import java.awt.*;
    import java.awt.print.*;
    import java.io.*;
    import javax.swing.*;
    public class MyPrinter implements Printable, Runnable { //, Pageable {
    private static Font fnt = new Font("Serif", Font.PLAIN, 11);
    protected PrinterJob job;
    protected MyDialog dialog = new MyDialog();
    protected RandomAccessFile raf;
    protected JFrame mainFrame;
    protected String fileName;
    protected File printFile;
    public MyPrinter(JFrame mFrame) { mainFrame = mFrame; } // end constructor
    public void printFile(String name) {// gives error message if file doesn't exist!
    printFile = new File(name);
    fileName = name;
    if((printFile.exists()) && (printFile.canRead())) {
    Thread myThread = new Thread(this);
    myThread.start();
    } // end if
    else {
    dialog.showError("Datei "+fileName+" existert nicht!", "Fehler mit Drucken");
    } // end else
    } // end printFile
    public void run() {
    job = PrinterJob.getPrinterJob();
    job.setPrintable(this); // Printable is an instance of myPrint
    if(job.printDialog()) { // user didn't cancel the printing
    try { job.print(); } // end try
    catch (PrinterException pe) {dialog.showError("Fehler: "+pe.getMessage(), "Problem");}
    } // end if
    } // end run
    public int print(Graphics g, PageFormat pf, int pageIndex)
    throws PrinterException {
    // pageIndex # corresponds to page number # + 1
    if (pageIndex > 0) { return Printable.NO_SUCH_PAGE; } // end if
    else {
    g.setFont(fnt);
    g.setColor(Color.black);
    int x = 75, y = 80;
    String oneLine;
    try {
    raf = new RandomAccessFile(fileName, "r");
    int fileLength = (int)printFile.length();
    while((((int)raf.getFilePointer()) < fileLength)) {
    oneLine = raf.readLine();
    g.drawString(oneLine, x, y);
    y += 15;
    } // end while loop
    raf.close();
    } // end try
    catch(IOException e) { dialog.showError("Fehler: "+e.getMessage(), "Problem");}
    return Printable.PAGE_EXISTS;
    } // end else
    } // end print
    /*public Printable getPrintable(int pageIndex) {
    return this;
    } // end getPrintable
    public int getNumberOfPages() {
    return 1;
    } // end getNumberOfPages
    public PageFormat getPageFormat(int pageIndex) {
    return job.defaultPage();
    } // end getPageFormat
    } // end MyPrinter class

    Well, I changed some things around, and assuming that in a file around 45 lines is a normal page, I am able to get the right amount of pages to be displayed in the dialog and to print, but still, the first page is printed fine and the rest are blank. I am baffled as to what I'm doing wrong. Printing to a printer should not be this hard to do! I have also noticed that many other people have had the same problem, but with no solutions. I am using the jdk 1.3.1 - is that a problem? Here is my new code and if anyone can propose a solution to the blank pages problem I would be very grateful!
    import java.awt.*;
    import java.awt.print.*;
    import java.io.*;
    import javax.swing.*;
    public class MyPrinter implements Runnable {
    protected PrinterJob job;
    protected MyPrintable myPrint = new MyPrintable();
    protected MyPageable myPage = new MyPageable();
    protected MyDialog dialog = new MyDialog();
    protected RandomAccessFile raf;
    //protected Startmenu mainMenu;
    protected String fileName;
    protected File printFile;
    protected int numPages = 0;
    public MyPrinter() { } // end constructor
    public void printFile(String name) {// gives error message if file doesn't exist!
    printFile = new File(name);
    fileName = name;
    if((printFile.exists()) && (printFile.canRead())) {
    Thread myThread = new Thread(this);
    myThread.start();
    } // end if
    else {
    dialog.showError("Datei "+fileName+" existert nicht!", "Fehler mit Drucken");
    } // end else
    } // end printFile
    public void run() {
    numPages = findNumPages();
    job = PrinterJob.getPrinterJob();
    job.setPageable(myPage); // this is an instance of Pageable
    if(job.printDialog()) { // user didn't cancel the printing
    try {
    job.print();
    try { raf.close(); } // end try
    catch(IOException e) { dialog.showError("Fehler: "+e.getMessage(), "Problem");}
    } // end try
    catch (PrinterException pe) {dialog.showError("Fehler: "+pe.getMessage(), "Problem");}
    } // end if
    } // end run
    private int findNumPages() {
    try {
    numPages = 0;
    raf = new RandomAccessFile(fileName, "r");
    int fileLength = (int)printFile.length();
    int lineNumber = 0;
    while((int)raf.getFilePointer() < fileLength) {
    lineNumber = 0;
    while((((int)raf.getFilePointer()) < fileLength) && (lineNumber < 45)) {
    raf.readLine();
    lineNumber++;
    } // end while loop
    numPages++;
    } // end while loop
    raf.seek(0);
    } // end try
    catch(IOException e) { dialog.showError("Fehler: "+e.getMessage(), "Problem");}
    return numPages;
    } // end findNumPages
    public class MyPageable implements Pageable {
    public Printable getPrintable(int pageIndex) { return myPrint; } // end getPrintable
    public PageFormat getPageFormat(int pageIndex) {
    PageFormat pf = new PageFormat();
    pf.setOrientation(PageFormat.PORTRAIT);
    return pf;
    } // end getPageFormat
    public int getNumberOfPages() {
    return numPages; // test
    //return ((int)printFile.length()/4000); // assume 4KB per page
    } // end getNumberOfPages
    } // end MyPageable class
    public class MyPrintable implements Printable {
    private Font fnt = new Font("Serif", Font.PLAIN, 11);
    protected int lastPageIndexChecked = -1;
    public int print(Graphics g, PageFormat pf, int pageIndex)
    throws PrinterException {
    // pageIndex # corresponds to page number # + 1
    pf.setOrientation(PageFormat.PORTRAIT);
    if (pageIndex >= numPages) { return Printable.NO_SUCH_PAGE; } // end if
    else {
    g.setFont(fnt);
    g.setColor(Color.black);
    String oneLine;
    int x = 75, y = 80, lineNumber = 0;
    try {
    int fileLength = (int)printFile.length();
    while((((int)raf.getFilePointer()) < fileLength) && (lineNumber < 50)) {
    oneLine = raf.readLine();
    lineNumber++;
    g.drawString(oneLine, x, y);
    y += 15;
    } // end while loop
    } // end try
    catch(IOException e) { dialog.showError("Fehler: "+e.getMessage(), "Problem");}
    return Printable.PAGE_EXISTS;
    } // end else
    } // end print
    } // end MyPrintable class
    } // end MyPrinter class

  • Can't print PDF file. Printer just sends out blank paper. Printer will print other non-PDF files.

    Printer company said it was an adobe problem

    Save the file on your desktop or in your download directory, open it with adobe acrobat reader then print it.
    I've got the same issue, apparently IE7 is having an hard time dealing with PDF files...
    Jin
    http://exonerationfiscale.com

  • Address Book Won't Print to file or printer or PDF

    Greetings -
    Using 10.4.8 on MacBook Pro 17" - Address Book will not print to the printer or to a PDF file when I attempt to print ALL of the addresses. It works for just 1 address. I didn't try 50, 60, etc. to see where it stops. I have about 750 names/contacts.
    Archived here is the same question, but with no answers given.
    Help!
    David

    I have giving up on syncing contacts. In my iMac Address Book, everything is correctly entered and formatted to suit the country where the contact lives.But MobileMe appers to allow you to select only the US, France, Germany and Japan, I think. Other countries seem to default to a US format. Despite the opening of yet another Apple Shop in the UK—in Covent Garden—MobileMe apparently can't recognize a UK address. What seems to happen when I try to sync addresses is that MobileMe thinks it has found different address entries on my coputers, and tries to replace what are correct formats with incorrect ones.
    I have just been right through my iMac Address Book, and the MobileMe contact list, and made sure that the data was entered in the same order. The only difference in the two lists was that the Address Book had address data correctly formatted for country in which the contact lives. Yet when asking for the Address Book to sync with MobileMe, the system says it wants to add 109 new contacts and delete a handful of others. These 109 addresses would either be duplicates of existing contacts, or replacements with the address formatting pushed into a US format.
    There has been another problem. Some time ago I found that the MobileMe contact list was full of duplicates in which the same data was displayed twice in a different order or a different format.
    Unless I am missing something, it seems that syncing using MobileMe, with its lack of address formatting options, is useless for anyone living outside the US, France, Germany or Japan, and useless for them if they happen to have any foreign friends.
    Apple seems unconcerned about this. Surely they must have realized that syncing contacts wouldn't work for many, perhaps most, users, yet they continue to promote it as a simple and effective option.
    Or am I missing something?

  • Cannot print pdf files from printer

    Problem just started.  Using new laptop with IE8 and have new version of Reader.

    Ok. Well, you didn't really answer most of the questions I asked so I'll have to take a guess at a fix.
    First, download, install and run the Adobe Reader cleaner tool and use it to remove all traces of Adobe Reader. Then, download and run the full offline installer for the latest version of Adobe Reader that your operating system can accept.
    If that doesn't work, please read my last post and answer all the questions I asked.

  • Lasrjet 800n not print pdf files

    I have a laserjet 8000n and have installed windows XP 64.  Since installation I have not been able to print PDF files.  Printer says processing but nothing prints and printer goes to ready.  Job is gone in printer q with no errors that I see.   I can print other info for example from word or excell.  

    There are 2 things that I would try.
    First, make sure your print driver is up to date. You can get drivers here:
    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&cc=us&prodNameId=14940&pr...
    Second, try some other free PDF readers to make sure it is not something to do with Foxit. Try some of these: Adobe Reader, Cool PDF Reader or Nuance PDF Reader. I am not recommending any of these in particular, they seem to be popular PDF reader choices that I have seen used.
    007OHMSS
    I was a support engineer for HP.
    If the advice resolved the situation, please mark it as a solution. Thank you.

  • Adobe Reader X stuck on "print to file"

    I have a problem with Adobe Reader 10.1.0 not saving my print settings after I close it.  I am running Windows Vista and trying to print to a RICOH printer/scanner/copier machine.  I checked "Print to file" by accident once and tried to print, and now every time I open Adobe Reader and try to print something, I have to uncheck "Print to file."  It is also stuck on "Print as image."  I have tried restoring the default settings on the printer, changing the default printer, and repairing the installation.  Checking and unchecking "Restore last view settings when reopening documents" doesn't make a difference.
    Has anyone else had this problem?  Is there a way to change the default so that "print to file" and "print as image" remain unchecked?  Thanks!

    I just fixed this issue. Running Adobe Reader X on Win7 x64 Enterprise.
    Locate HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\10.0\PrefsDialog and modify the key "aLastPrefsPanel" to say "Display". I found on the troubled PC it was set to "Startup"
    In your cases running 10.1 the registry path may be "10.1" rather than "10.0"
    That should do the trick.
    Peter

  • Why cant I print pdf files on my iMac?

    Got a new iMac.  When I try to print pdf files, the print window appears, but the "preview" document is blank.  WHne I hit print, a blank page comes out.  Any suggestions?

    What program are you using when you attempt to print?
    Does anything else print?

  • When I try and print a web page in the print screen ALL the Print Frame options are greyed out. It won't let me print a page as I see it. I need to pring a page as is. How do I do it in the new 8.0??

    I go to print and try to select the radio button to print all frames, but It's not working

    The '''Print Frames''' options are greyed out unless the web page is made with Frames. I-Frames don't work the same.
    Check out this '''''frames test page''''' - http://www.draac.com/framestest.html <br />Is the '''Print Frames''' part of the print dialog box active?
    As far as printing a page as you see it, many web pages use '''print.css''' files for print-media. The print.css specifies exactly what is to be sent to the printer and it can control the formatting of the printed page.

Maybe you are looking for

  • Iphoto not working on my new mac

    hi, i got my mac yesterday, with the new lion update with it, and whenever i try and open iPhoto it says that there is an problem. i don't know what to do. help.

  • Store Image through Servlet

    I want to store a JPG image into database column through Servlet and dispaly it on a JSP page through Beans how can i ?

  • Data analysis question

    1.Is it compulsory to use all the events in Reports? 2.What transactions do you use for data analysis? 3.What are selection texts? 4.When a program is created and need to be transported to prodn does selection texts always go with it? If not how do y

  • Register Secondary ACS with Primary ACS 5.4 patch 6 and getting error

    Scenario #1: prodacs1 and prodacs2 version 5.4 patch 6 with IP address of 10.1.1.1/24 and 10.1.1.2/24, respectively.   Both prodacs1 and prodacs2 are running on VMWare ESXi 5.1.  Both are sync'ed with Active Directory and authenticate users to manage

  • Convert varchar to date in BO Universe with Substring and instring function

    to_date(substr(xxxx_v.e_details,instr(xxxx_v.e_details,'|',1,2)+1,9),'DD-MM-YYYY') In the universe while defining the object as date i was facing probs can any body help me out. the column xxxx_e_details is having the datatype varchar in database and