Printing in the local printer

Hello all,
We are converting an SQLForms 3 application(SCO unix DB Server) to web application(10g AS Linux, 9i DB SUN Solaris,10g Forms).
We have to print a file stored in the AS/DB server in the local machine's printer.Searched a lot but in vain.
Can anyone suggest a solution..?
Thanks in advance..
Jeneesh

What i had tried, is just very simple,
1) create a java class, PrintWrapperjava.java as
package print;
import oracle.forms.ui.*;
import oracle.forms.properties.*;
import java.io.FileOutputStream;
public class PrintWrapperjava extends VBean
     private static final ID FILECONTENTS = ID.registerProperty("FILECONTENTS");
     private static final ID PRINTER = ID.registerProperty("PRINTER");
     private static final ID PRINT = ID.registerProperty("PRINT");
     private StringBuffer fileContents= new StringBuffer();;
     private String printerName;
     public boolean setProperty(ID id, Object value)
try
{  if (id == FILECONTENTS)
fileContents.append(value.toString());
System.out.println("File Contents : " + value.toString());
return true;
else if(id==PRINTER)          {
     System.out.println(" PRINTER : " + value.toString());
     printerName = value.toString();
return true;     
return super.setProperty(id, value);
catch (Exception e)
{   e.printStackTrace();
return false;
public Object getProperty(ID id)     {
     if (id == PRINT) {
          try{
               FileOutputStream printerOutput = new FileOutputStream(printerName);
               byte[] toByteArray = fileContents.toString().getBytes();
               printerOutput.write(toByteArray);
               printerOutput.flush();
               printerOutput.close();
               fileContents = new StringBuffer();
               return (Object) "Printing Success";
               catch(Exception e)     {
               System.out.println("Exception has occured " + e.getMessage());
               return (Object) "Printing Failure due to : "+ e.getMessage();
return super.getProperty(id);
2) Create a jar, and then sign it.
3) From forms,
you need to supply, the fileContents and the printerName, and Print, event will trigger the action.
like
1) create a bean area, set its impl class as print.PrintWrapperjava
2)
set_custom_property('BN_PRINT',1,'FILECONTENTS',v_file_contents);     
set_custom_property('BN_PRINT',1,'PRINTER',v_share_printername_wrt_client);
v_msg := GET_CUSTOM_PROPERTY('BN_PRINT',1,'PRINT');
message(v_msg);
message('');
This has lots of limitations.. but could serve as just a starting point.
All the best !!
Regards
Deepz : )

Similar Messages

  • Counter Sales - Printing Receipt in Local Printer?

    Dear All,
    We have a Counter Sales scenario. We are using Quick Sale Order for that.
    We have around 14 branches in Dubai, Abhudhabi etc.
    When a customer comes to a counter, the sales person will book the order and print a invoice on a preprinted stationary in a dot matrix printer which will be located in each counter.
    Our issue is the time consumption of printing in the local printer as the every time a request is run, it will go to the server and comes back.
    For example, when a person in Abhudhabi prints a Receipt, the request will come to Dubai ( Since the server is in Dubai) and will print in the local printer.
    Is there any way to increase the speed of the printing request?
    Regards
    Merlin Rajesh

    The data in the invoice/receipt/order will always have to go from the server to your local printer across the network. Whether direct to your printer from the server, or through your client PC then to the printer.
    If the time consumption was inherently caused by the network, you would probably be having serious performance issues.
    So my guess is that you are submitting a job to the concurrent manager and the time delay is the time from when you submit the request to when the job actually starts (and completes) then spools to the printer, with the main delay being it waiting in the queue of pending requests. Otherwise it may be how long the print requests are taking to run.
    So you need to confirm where problem lies. Check this via the Date Submitted, Date Started and Date Completed on the current request.
    If the time delay is between the Date Submitted and Date Started then you could define a new concurrent manager specifically (and only) for handling the print jobs that are time critical via System Administrator > Concurrent Manager > Define (copy the Standard Manager), and create specialization rules that only include your print concurrent programs (Invoice, Receipt). Then on the work shift, change the sleep seconds down to a low value (say 5 or 10 seconds).
    PS. An alternative way to do this could be to create a "form" or front end component that gives you the report/format you need in real time, and print directory from your local machine ... but thats gonna take more than 5 minutes to create ;-)
    Gareth
    Blog: http://garethroberts.blogspot.com

  • How Can I print Oracle Report 9i directly To Printer on the local network?

    Dear All;
    How Can I print Oracle Report 9i directly To Printer on the local network?
    or to any other computer ? or to my default printer without prevoiues know the printer name i mean found it in my connected printer?
    plear help me?
    Best Wishes

    1. Check documentation for DESNAME and DESTYPE
    2. See 1 as long as they are a shared resource
    3. Think you must know the name, but please check or documentation
    Regards,
    Martin
    PS. There's a Reports Forum here which would be a better option for posting this question

  • How to send a file to a certain printer at the local network?

    Hello,
    Is there any Java API (standard or free packages) that allows to send a certain file from the filesystem to a certain printer at the local network, not necessarily the default one that the machine the code is running on is using? In case there is one, a code example could be nice...

    Hi Roy,
    There is a library part of the standard java for printing and searching printers. Have a look at the package
    javax.print
    A google search with the package name will lead to tutorials and code samples I guess.
    HTH
    Peter

  • Windows cannot connect to the printer the local print spooler service is not running please restart the spooler or restart the m

    We have 7 computers on a local network 3 of them have local printers 2 and are brand new Vista equiped. we shared the local printers on the vista machines but they are unaccessable from one vista to the other... it works from an XP to a Vista, but not from a Vista to a Vista.... go figure.... When we try to add the printers, the error message that we get is: "windows cannot connect to the printer. the local print spooler service is not running. please restart the spooler or restart the machine."
    I would appreciate any help...
    Thank you

    This worked for me.  GP
    Problem : error 1075 and Local print spooler service is not running.
    problem description : I have a Lexmark x4270 all in one. I installed the driver for it in my new laptop running Vista. Turns out the driver is not for Vista but XP. I uninstalled the XP driver and downloaded a Vista driver from Lexmark. When I try to run the printer software I get a message "Local print spooler service is not running. Please restart the spooler or restart the machine." I tried all of that. I have looked this problem up on the web and it is quite common with Vista. Many of the "solutions" say it is a problem with an incomplete removal of the incorrect printer driver and they show how to correct in the registry. I am not comfortable tinkering with the registry and thought I'd consult with you first.
    I tried "everything" I could to fix the problem of getting "error 1075" fixed in my HP laptop running Vista.  HP came up with simple solution below.  The regedit part is what fixed mine.  I did not need the safe mode part.  I think Lexmark should add the solution to your knowledge base.
    ==============================
    From HP:  Please perform the below given steps in safe mode to resolve the issue.
    Reboot your notebook and press F8. The system will show some booting options select safe mode.
    Note: Starting computer in safe mode may take some time.
    Uninstall the printer using Programs and Features from the control panel of your notebook.
    Uninstalling any software from Control Panel :
    1. Click on Vista (start) button
    2. Click on control panel
    3. Double click on Programs and Features
    4. Click on YOUR Lexmark Printer  and click on remove.
    Download and reinstall the printer software using the below given link :
    http://downloads.lexmark.com/cgi-perl/downloads.cgi?ccs=229:1:0:438:0:0&searchLang=en&os_group=Windows%20Vista&target=
         NOTE:  Clicking the link may give an error indicating it is invalid.
                Copy and paste the entire link in a new browser window.
    After the installation of drivers, restart the notebook into normal mode. Now plese check with printing any document. If the still persists then perform the below given steps :
    Click on Vista (Start) button, and type Regedit.exe in search bar
    Navigate to the following branch
    HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Spooler
    In the right-pane, double-click the DependOnService value
    Delete the existing data, and then type RPCSS
    Close Regedit.exe
    Restart the computer.
    This should resolve the issue.
    For information on keeping your HP and Compaq products up and running, please visit our Web site at:
    http://www.hp.com/go/totalcare

  • Printing Problem at LOCAL  Printer

    Hello guru's,
    Through workflow after approval and release of Purchase order, it should print at a LOCAL printer. but it is not happening. Will anyone suggest me the reasons behind that.
    Full points for useful solution

    Hi,
    There're quite a number of steps between release of PO and the piece of paper appearing on the printer.
    Has a spool request been created?  What status does the spool request have?  Is there an error log for the spool request?
    Is the release happening in a background task or dialog?  If LOCAL is using SAPlpd on the user's PC it won't work in the background.
    Regards,
    Nick

  • How Do I Redirect LPT1 Printer Port to 'LOCAL Printer' in Windows 7

    I have previously redirected LPT1 Port to a 'Network Printer' as well as 'Print Server' with NO PROBLEMS. 
    However, I have NOT been able to redirect LPT1 Port to a 'LOCAL' PRINTER. I have already set up:
     - new HP Laser Printer (tested, no problem printing in Windows)
     - the printer is SHARED, shared name is "HPLaser" (tested by viewing Shared Printer Name and Computer Name in DOS)
     - bat file as --> Net
    use Lpt1 \\DkTop1\HPLaser /persistent:yes 
       (I checked to ensure the 'Computer
    Name' and the 'Shared
    Printer Name' are correct. Tested by running bat command, no
    error message)
    When printing in DOS and viewing "What's Printing" from Printer Icon, 
     - the DOS print job appears immediately as "spooling", 
     - then "printing" and "USB001" Port. 
    So, it appears to be printing from the DOS application, also
    note NO ERRORS from DOS Program or Windows but it does NOT print.
    The only difference between the 'Local Printer' setup and
    the 'Print Server Printer' setup is,
     the 'PRINT SERVER'
    goes to an "IP Address w/Standard TCP/IP Port"
    and the 'LOCAL PRINTER'
    goes to "USB001 Virtual Printer for . . .". 
    IS THERE A PROBLEM in
    SETTING UP THE 'LOCAL PRINTER'
    with 'USB001 VIRTUAL PRINTER' Port???
    If so, how do I resolve? If not, please note what is the problem(s) and resolution(s). Thanks.

    Hi,
    you install the new printer, which port you choose to use? What do you mean by saying "'USB001 VIRTUAL PRINTER' Port"
    here?
    As the printer is configured locally, there is no need to redirect the port to it.
    Install a printer
    http://windows.microsoft.com/en-hk/windows/install-printer#install-printer=windows-7
    Here for more information:
    http://windows.microsoft.com/en-hk/windows-vista/add-or-remove-a-printer
    If possible please take a try to delete the printers holding the Lpt1 port, then reconfigure the local printer following the instructions provided above.
    Hope this may help
    Best regards
    Michael
    If you have any feedback on our support, please click
    here.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • How to print in a local printer

    Hi, i was wondering if is there an option to show the button that allow the user to select the local printer to print the report generated by de JSP viewer. I only can print the report via PDF and that's not a good solution for my project. Can you help me, i'm new in crystal reports for Eclipse, i used to work with it in visualbasic and i only had to select the buttons to appear in the report navigation bar.

    I'm trying to implement use of the ActiveX control but get an error message in compiling my jsp (which compiles & runs otherwise):
    code snippet:
    crystalReportPageViewer.setPrintMode(CrPrintMode.ActiveX);
    compile error:
    CrPrintMode cannot be resolved
    I get the same error message regardless of whether I spell ActiveX this way or all upper case (as some examples show).
    Anyone have any suggestions?
    Thanks,
    Bill

  • When I try to print to the 'xps' printer the system hangs

    I have tried to print a screen to 'xps' printer but the system seems to hang at the 'preparing to print stage

    Ajlan,
    I am running Windows 7 SP1. I went into Office 10 Word and simply tried to print a word document to the local print to file. In the spool queue every document I tried to print simply said error. There was no code listed. I followed the instructions and created a Xerox 6120 PS printer first then deleted the adobe printer and added a new adobe printer. The spool queue continued to appear. I tried printing a message out of outlook and the same error appeared.
    Thank you for trying to help me.
    Tony Candito

  • EPrint from Android is printing to the wrong printer

    This is very odd.  I have a brand new OfficeJet 8500A that I just set up.  I got ePrint configured and created an ePrint account, installed the ePrint app on my Android phone, and tried to test it.  On the phone I put in my printer's ePrint email address, and it correctly identified it as an HP 8500A.
    So then I went to try printing a test document, and it said it was going to print it to my 8500A - but it actually printed on my Photosmart 8450!  The Photosmart is on the same home network ast he 8500A, but it doesn't do ePrint as far as I know.  I think it predates the creation of ePrint.  And in any case, I certainly never did any kind of configuration to tell ePrint to use it.
    Can anyone explain why it's printing to the wrong printer?

    Hello,
    The ePrint Center and ePrint functionality (the ability to send an email to your printer) is different than the ePrint Home and Biz app. The ePrint Home and Biz app can be used with printers that are on your local network. It is possible that you simply selected the 8450 in the dropdown menu on your android device. Please verify you have selected the correct printer and if so, we can do some further troubleshooting.
    Thanks!
    I am an HP employee.
    I was an HP employee.
    Reminder: Please select the "Accept as Solution" button on the post that best answers your question. Also, you may select the "Kudos" button on any helpful post to give that person a quick thanks.

  • How to print reports on local printer?

    We are using the rwservlet to print the reports using Oracle reports 10g release 2 report server.
    Is there any way to send the output to local printer directly instead of browser. The output is in PDF format.
    Any suggestion/link will be appricated.

    i have a group of reports, need to print at once. so planning to call the reports one by one from java using rwservlet as below..
    1.http://localhost:7778/reports/rwservlet?server=rep_barcode_frhome2&destype=Printer&printjob=yes&desformat=pdf&report=/tmp/abc1.rdf&cmdkey=abc
    2.http://localhost:7778/reports/rwservlet?server=rep_barcode_frhome2&destype=Printer&printjob=yes&desformat=pdf&report=/tmp/abc2.rdf&cmdkey=abc
    N.http://localhost:7778/reports/rwservlet?server=rep_barcode_frhome2&destype=Printer&printjob=yes&desformat=pdf&report=/tmp/abcN.rdf&cmdkey=abc
    Since it will have many pdf, so want to print directly to local printer to user. they will be accessing through Internet.
    Thanks in advance.

  • HT2495 I have a wirless network. I connect all my computers to it and a printer. I can print wirelessly from all computers. I tried to add the printer to my new Macbook, but can't find the printer on the add printer and scan icon on preferences.

    I have a wirless network. I connect all my computers to it and a printer. I can print wirelessly from all computers. I tried to add the printer to my new Macbook, which is connecte to the network, but can't find the printer on the add printer and scan icon on preferences. I downloaded a installation printer utility from the Manufacturer (lexmark), but it didn't work. Any sugestions?
    Thanks,
    Ivette

    You would need to get the IP address of your printer then manually add a network print queue.
    To get the IP address, on the control panel of your printer, press on Setup > Network Setup > TCP/IP > View/Set IP address.

  • The photo print quality from my Mac to my Epson Artisan 810 is poor.  When I take the same photo files (JPEGs) to my PC to print to the same printer without even uploading them to the PC, they print brighter and crisper from my PC.

    The photo print quality from my Mac to my Epson Artisan 810 is poor.  I just purchased my iMac for my photography business in Jan. (this is my first Mac).  When I first tried printing, I noticed the quality wasn't as good as I expected it to be.  Then, I had to print 4-3.5x5s on a sheet, so I e-mailed the image to myself and opened it on my PC to print it (much easier to print that way on PC in Windows Photo Gallery - I think it's impossible to print that way in iPhoto).  That's when I first noticed that when I take the same photo files (JPEGs) to my PC to print to the same printer without even uploading them to the PC, they print brighter and crisper from my PC.
    I've already been on the phone and e-mail w/Applecare many times over this issue. We've tried creating a test user and printing from there, and we've tried reinstalling the OS.  I've tried printing from iPhoto, ImageCapture, and Preview apps/utilities, all w/the same result - no comparison to the PC-printed versions (no enhancements have been performed on the PC).
    I'm out of ideas, and so is Applecare.  They say it's most likely a driver issue b/c the printer is outdated, and that the only solution is to buy a new printer.  BUT it is a pain for me to purchase a new printer - it takes days of research due to the nature of my business and the fact that I need a printer that can print directly onto a disc.  I love this printer and don't want to have to buy a new one if I don't have to.

    englishfreak2004 wrote:
    Yes.  I've checked for updates, and the driver I installed is the same as the one on Epson's website.  I also spoke with Epson Customer Service, which was a dead end.  Apple says the problem is due to an Epson driver issue (blaming Epson), but Epson says that with the older printers, it's actually Apple who creates the driver, so the problem is actually with Apple.  Typical he-said, she-said...
    Maybe not. Probably worth checking here:
    Epson drivers for Mavericks:
    http://www.epson.com/cgi-bin/Store/support/SupportMavericks.jsp

  • Printing to the wrong printer

    we have a small network at home with three Macs (all running 10.6) and two laser printers (Brother b/w, HP color) the HP ColorLaser Jet is the latest device added to the network. The printers are on the network using Ethernet.
    Everything worked fine so far but since three days on the MacBook the printers are mixed up. If I select the Brother as the printer to use I get all the options from the Brother driver but the paper will be printed by the HP printer ?!
    First I suspect my daughter but I could see that "strange" behaviour myself. Why that, and more important how can this be fixed?

    sure I won't. Indeed I have setup my DHCP server that way (there is an address range outside the dynamic range for devices that need fixed addresses). Just in case the router and firewall have fixed address - you never know.
    But having fixed addesses for the LAN priters as well I have now five devices outside the dynamic range of the DHCP compared to the three notebooks?
    But back to the issue of the wrong printer. What disappoints me is the fact that there is no error message. The system just works the wrong way around. You can choose your printer, you can choose the print layout and all the other options and at the end it fails (sending the data to the wrong device).
    I know IT is still complicated behind the scene. But this situation should not happen.

  • Printing to the wireless printer

    The Laptop with Windows 8, will no longer printer to the wireless printer. What could the problem be?

    Hello Vance,
    The community is eager to assist!  To ensure the most accurate information is provided, we’ll need to know the model of the printer you are using.  We look forward to hearing back from you!

Maybe you are looking for