Printing in Linux

Hi all,
I've tried to print using Java with Ubuntu and with redhat and never succeeded.
The question is: has anybody get success in printing with java+linux?
I use CUPS and it works when printing pdfs, text and OpenOffice.org documents. But when I try something like this:
if (pJob.printDialog()) {
      pJob.setPrintable(printableDocument, new PageFormat());
      try {
         pJob.print();
      } catch (PrinterException printerException) {
      System.out.println("Error Printing Document");
}the print dialog appears I select the correct printer and it seems that everithing works but when the document enters into the queue as 'JAva Printing' it's in the state 'printing' but it soon automatically changes to 'stoped'. At no moment the printer really receives the document.
My CUPS logs are:
/var/log/cups/access_log
localhost - - [09/May/2007:09:07:46 +0200] "POST / HTTP/1.1" 200 75
localhost - - [09/May/2007:09:22:49 +0200] "POST /printers/ HTTP/1.1" 200 175
localhost - - [09/May/2007:09:22:49 +0200] "POST /printers/ HTTP/1.1" 200 175
localhost - - [09/May/2007:09:22:49 +0200] "POST /printers/ HTTP/1.1" 200 175
localhost - - [09/May/2007:09:22:49 +0200] "POST /printers/ HTTP/1.1" 200 175
localhost - - [09/May/2007:09:22:50 +0200] "POST /printers/ HTTP/1.1" 200 175
localhost - - [09/May/2007:09:22:52 +0200] "POST /printers/ HTTP/1.1" 200 175
localhost - - [09/May/2007:09:22:56 +0200] "POST /printers/ HTTP/1.1" 200 175
localhost - - [09/May/2007:09:22:56 +0200] "POST / HTTP/1.1" 200 135
localhost - - [09/May/2007:09:22:56 +0200] "POST / HTTP/1.1" 200 135
localhost - - [09/May/2007:09:22:56 +0200] "POST / HTTP/1.1" 200 75
localhost - - [09/May/2007:09:22:56 +0200] "POST /printers/lj2430 HTTP/1.1" 200 2534
/var/log/cups/error_log
I [09/May/2007:09:06:16 +0200] Listening to 7f000001:631
I [09/May/2007:09:06:16 +0200] Loaded configuration file "/etc/cups/cupsd.conf"
I [09/May/2007:09:06:16 +0200] Configured for up to 100 clients.
I [09/May/2007:09:06:16 +0200] Allowing up to 100 client connections per host.
I [09/May/2007:09:06:16 +0200] Full reload is required.
I [09/May/2007:09:06:17 +0200] LoadPPDs: Read "/etc/cups/ppds.dat", 15 PPDs...
I [09/May/2007:09:06:17 +0200] LoadPPDs: No new or changed PPDs...
I [09/May/2007:09:06:17 +0200] Full reload complete.
I [09/May/2007:09:06:18 +0200] Added remote printer "hp1220c_serverdriver"...
I [09/May/2007:09:06:25 +0200] Added remote printer "hp1220c"...
I [09/May/2007:09:06:40 +0200] Added remote printer "lj2430"...
I [09/May/2007:09:06:43 +0200] Added remote printer "lj2430@as1"...
I [09/May/2007:09:06:43 +0200] Added implicit class "lj2430"...
I [09/May/2007:09:22:56 +0200] Job 1 queued on 'lj2430' by 'oliver'.
I [09/May/2007:09:22:56 +0200] Started backend /usr/lib/cups/backend/ipp (PID 5022) for job 1.
/var/log/cups/page_log
lj2430@sauron oliver 1 [09/May/2007:09:22:56 +0200] 1 1 - localhost
lj2430@sauron oliver 1 [09/May/2007:09:22:56 +0200] total 0 - localhost
lj2430@sauron oliver 1 [09/May/2007:09:23:07 +0200] total 0 - localhost
Can somebody give me a hint about this!
Thanks in advance!

The OpenPrinting database shows that this printer uses the splix driver. http://openprinting.org/show_driver.cgi?driver=splix
I had the source code on hand and did a quick compile. I could only get a ppc binary, but it should work on an Intel Mac as well. You can grab the tarball at http://webpages.charter.net/mbroughtn/beta/splix_beta1.tar.gz . Place the file on your Desktop. Then to install use the Terminal command sudo tar -C / -xzf ~/Desktop/splix_beta1.tar.gz This will install two files--
/usr/libexec/cups/filter/rastertospl2
/Library/Printers/PPDs/Contents/Resources/en.lproj/ml1610.ppd.gz
You will also need to install Ghostscript from http://www.linux-foundation.org/en/OpenPrinting/MacOSX/foomatic
Please post back on whether this works. The splix driver is still not fully tested according to the developer's site. Any and all information on the usefulness of this driver will be appreciated.
Matt

Similar Messages

  • How to Print to Linux Terminal

    Would anyone happen to know how to create a VI that prints to Linux Terminal.  I wish to make a test VI that verifies the RTE is working on a Linux Server and no more dependencies/Libraries are necessary.  Going to be pretty simple.  Just a VI that, when ran, will write "Hello World" to terminal then close.  All of that is pretty easy of course.  I just don't know how to print to Terminal.
    Remember, code does exactly what you tell it.

    I don't have a linux system to test on, but it seems like you could modify this comunity code sample to do what you're looking to do.  Have a look: https://decibel.ni.com/content/docs/DOC-40941

  • Printing from Linux to Windows shared printer

    I am trying to print from Linux to a shared printer on a Windows XP PC. I installed cups and foomatic, started cupsd and configured the printer (HP Deskjet 720C) in KDE control centre. When I try to print a test page I get the following message:
    Catastrophe! - KNotify
    A print error occurred. Error message received from system:
    cupsdoprint -P 'deskjet' -J 'KDE Print Test' -H 'localhost:631' -U 'root' -o ' multiple-document-handling=separate-documents-uncollated-copies orientation-requested=3' '/opt/kde/share/apps/kdeprint/testprint.ps' : execution failed with message:
    client-error-not-possible
    I have Googled like crazy but couldn't find a working solution.
    For reference:
    /etc/cups/printers.conf
    # Printer configuration file for CUPS v1.1.23
    # Written by cupsd on Wed 29 Jun 2005 09:33:20 PM BST
    <DefaultPrinter deskjet>
    Info HP DeskJet 720C
    Location
    DeviceURI smb://guest@MSHOME/ANDROMEDA/HPDeskJet
    State Idle
    Accepting Yes
    JobSheets none none
    QuotaPeriod 0
    PageLimit 0
    KLimit 0
    AllowUser root shaurz
    </Printer>
    /etc/cups/cupsd.conf (comments stripped)
    LogLevel info
    Port 631
    <Location />
    Order Deny,Allow
    Deny From All
    Allow From 127.0.0.1
    </Location>
    <Location /admin>
    AuthType Basic
    AuthClass System
    Order Deny,Allow
    Deny From All
    Allow From 127.0.0.1
    </Location>
    lpstat -t
    scheduler is running
    system default destination: deskjet
    device for deskjet: smb://MSHOME/ANDROMEDA/HPDeskJet
    deskjet accepting requests since Jan 01 00:00
    printer deskjet is idle. enabled since Jan 01 00:0

    Rather than use SMB to connect from Lion to the Windows XP printer share, a better method is to enable Print Services for UNIX on Windows XP and then use LPD on the Mac to print via the Windows share.
    To install Print Services for UNIX on Windows XP:
    Log on to the Windows server with an administrative-level account.
    Start the Add/Remove Programs tool in Control Panel.
    Click Add/Remove Windows Components.
    Click Other Network File and Print Services, and then click Details.
    Click to select the Print Services for UNIX check box, and then click OK.
    Follow the instructions on the screen to finish the installation
    If you haven't done so already, share the printer on Windows XP and make the name one word - no spaces or special characters
    With the print services enabled you can then create the printer queue on Lion.
    Open Print & Scan and click + to add a printer
    Select the IP icon and set the protocol to Line Printer Daemon - LPD
    For the Address, enter the IP address of the Windows XP computer
    For the Queue name, enter the share name set for the printer in Windows XP
    Name and Location are free text so you can set this to something meaningful
    For the Print Using menu, select the supporting printer driver. Note that like connections via SMB, the vendors driver for Lion in some cases cannot be used and an alternate like those offered by the Gutenprint suite must be used.
    Click the OK button to complete the queue creation.
    Now you are ready to test the new print queue.   

  • On Mac OS 10.5, can't print to Linux CUPS printing server

    We attached a USB printer to a Linux server, which is CUPS1.3.8 installed.
    The printer is Epson Stylus CX5900.
    Printing from another Linux with CPUS is OK.
    But I can NOT print from my MacOSX10.5 system.
    I tried IPP, SMB, no success.
    Visit the http://127.0.0.1:631 on Mac, the CUPS on Mac even can not discovery the printer shared by Linux server.
    If I add added the printer as samba on MacOS, it will report
    /Library/Printers/EPSON/InkjetPrinter/Filter/rastertoescp.app/Contents/MacOS/ras tertoescp failed
    I see many users report printing issues on MacOSX10.5 on the Internet.
    What's the matter?
    As I know, MacOSX10.4 can print to printer on Linux CUPS server.

    Slow down a bit and think this through.
    CUPS on linux is nearly identical to CUPS on OS X - but there is no Mac-to-Mac Apple proprietary print sharing. Rather, on linux you are sharing the printer using standard printing protocols. Just like on the Mac (when using the standard protocols like Windows/SMB or IP printing), linux print queues expect postscript input. Try using a generic postscript driver from the mac.
    And when you add the printer via Windows Printing or IP > LPD or IPP, you will need to know the queue name for that printer from the linux box. (one computer with one IP address can have multiple printers - so what's the additional address info to print to your desired printer? - queue name.)
    HTH

  • How to configre printer  at linux and R12 instance

    Dear all,
    Please guide me.how to configure printer at linux and configure at R12 also.
    Regards
    Dharma

    933950 wrote:
    Dear all,
    Please guide me.how to configure printer at linux and configure at R12 also.
    Regards
    DharmaThis topic was discussed many times in the forum before, please see old threads for details.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Printer&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Printer+AND+R12&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Printer+AND+Setup&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • [PARTIALY SOLVED]Can't see SAMBA share or Printer in Linux

    Greetings all,
    I have built a headless server running Arch linux as the base OS.  I am running SAMBA and CUPS and performing all maintenance of this server via SSH.
    The SAMBA share I can see (read/write) on all the Windows 7 machines on the network as well as the Printer connected to the server.  But I can't see it when I open Thunar or PCManFM.  Nor can I access the printer.
    It's obviously something I am doing wrong but I have Googled different parameters trying to find a solution but have come up short.
    Your assistance and guidance in putting me in the right direction is most appreciated.  All my Linux machines are running Arch.
    Thanks,
    Ian
    Last edited by ichase (2012-10-28 07:19:14)

    I have looked high and low.  The printer is set up via CUPS and the printer in smb.conf is set to CUPS.  All 4 windows computers in the house now have this printer set as default and can print fine.
    But if I try to print in Linux, for example in Libreoffice, I get No default printer found.  Please choose a printer and try again.  When I click ok, the network printer does not show up for me to select.
    I have tried updating the /etc/cups/client.conf on the client computer and it is set as:
    # see 'man client.conf'
    homeserver /var/run/cups/cups.sock
    homeserver 192.168.X.XX
    From what I have read so far, this is correct.  When I go to the CUPS Web Interface it shows under Manage Printer my HP 7300 Series printer there and in idle waiting for job.  And in Windows I can print to it just fine.
    As far as I can  tell SAMBA is set up correctly (I can mount the file drive in Arch with no issues) and CUPS seems to be configured correctly as well from all that I have read.
    Any insight would be great,
    Thanks,
    Ian
    Last edited by ichase (2012-10-28 07:28:31)

  • Unable to print in linux using java 1.5

    Hi i could't able to print in linux system using java 1.5. Printer name is detecting.
    when i execute printDataTransferCompleted then printJobNoMoreEvents happening But print is not happening.
    here i attached the source.
    import javax.print.Doc;
    import javax.print.DocFlavor;
    import javax.print.DocPrintJob;
    import javax.print.PrintService;
    import javax.print.PrintServiceLookup;
    import javax.print.SimpleDoc;
    import javax.print.event.PrintJobEvent;
    import javax.print.event.PrintJobListener;
    public class HellowLinux {
         public static void main(String args[]){
              String printText = "The Java Tutorials are practical guides for programmers" ;
              DocFlavor byteFlavour = DocFlavor.BYTE_ARRAY.TEXT_PLAIN_UTF_8;
              Doc myDoc = new SimpleDoc(printText.getBytes(), byteFlavour, null);
              PrintService[] services = PrintServiceLookup.lookupPrintServices(byteFlavour, null);
              System.out.println("No of printer detected : "+services.length );
              for(int i = 0; i<services.length; i++){
                   System.out.println("Printer Name : "+services.getName());
              if(services.length > 0){
                   DocPrintJob myJob = services[0].createPrintJob();
                   myJob.addPrintJobListener(new PrintJobMonitor());
                   try{
                        myJob.print(myDoc, null);
                        System.out.println("Printed Successfully ... ");
                   }catch(Exception e){
                        System.out.println("Error : "+e.getMessage());
         private static class PrintJobMonitor implements PrintJobListener {
              public void printDataTransferCompleted(PrintJobEvent pje) {
                   // Called to notify the client that data has been successfully
              // transferred to the print service, and the client may free
              // local resources allocated for that data.
                   System.out.println("Data transfer Completed : "+pje.hashCode()
                             +"\n"+pje.getPrintEventType());
              public void printJobCanceled(PrintJobEvent pje) {
                   // Called to notify the client that the job was canceled
              // by a user or a program.
                   System.out.println("Cancelled : "+pje.hashCode()
                        +"\n Event Type "+pje.getPrintEventType());
              public void printJobCompleted(PrintJobEvent pje) {
                   // Called to notify the client that the job completed successfully.
                   System.out.println("Completed : "+pje.hashCode()
                             +"\n Event Type "+pje.getPrintEventType());
              public void printJobFailed(PrintJobEvent pje) {
                   // Called to notify the client that the job failed to complete
              // successfully and will have to be resubmitted.
                   System.out.println("Failed : "+pje.hashCode()
                             +"\n Event Type "+pje.getPrintEventType());
              public void printJobNoMoreEvents(PrintJobEvent pje) {
                   // Called to notify the client that no more events will be delivered.
                   System.out.println("No More Events : "+pje.hashCode()
                             +"\n Event Type "+pje.getPrintEventType());
              public void printJobRequiresAttention(PrintJobEvent pje) {
                   // Called to notify the client that an error has occurred that the
              // user might be able to fix.\
                   System.out.println("Requires Attention : "+pje.hashCode()
                             +"\n Event Type "+pje.getPrintEventType());
    Edited by: 936393 on May 24, 2012 12:08 AM

    Hi ,
    Go to Help menu >> update
    it will update your application to 13.1
    then go to  Editor 's Edit menu >> Preferences and click on Reset Preference on next launch .
    after that relaunch your application..
    Refer article for the same:
    https://helpx.adobe.com/photoshop-elements/kb/elements-printer-issue-incompatible-error.ht ml

  • Negative error code when trying to print from Linux OS

    What does a negative error code mean when trying to print from Linux OS.
    Terminated with error: REP-50157: Error while sending file to printer apps_dev. Exit with error code -1
    It is Oracle Application Server 9.0.4 on Redhat Linux when I'am directly sending the output to the printer.
    Thanks for the help in advace.
    -P

    Reinstall or update your Lexmark printer driver.

  • Does printing in Linux RedHat requires CUPS?

    Does the jdk1.4 Printing API require CUPS to run in Linux RedHat? I installed the JDK and programs run well but I cannot direct the printing to a particular prnter. The printing allways goes to the default printer. I ran the examples in Print2DPrinterJob.java (code at the end of this posting) and I find that the windows to select the printers appear, I select the printer to output the image, but the printout allways goes to the default printer regardless of the printer selected.
    Since the java Printing API requires the IPP and since LPR is not based in this protocol, I was wondering if I must install CUPS in the server in order to use the printing API
    import java.io.*;
    import java.awt.*;
    import java.net.*;
    import java.awt.image.*;
    import java.awt.print.*;
    import javax.print.*;
    import javax.print.attribute.*;
    import javax.print.attribute.standard.*;
    public class Print2DPrinterJob implements Printable {
         public Print2DPrinterJob() {
              /* Construct the print request specification.
              * The print data is a Printable object.
              * the request additonally specifies a job name, 2 copies, and
              * landscape orientation of the media.
              PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
              aset.add(OrientationRequested.LANDSCAPE);
              aset.add(new Copies(2));
              aset.add(new JobName("My job", null));
              /* Create a print job */
              PrinterJob pj = PrinterJob.getPrinterJob();
              pj.setPrintable(this);
              /* locate a print service that can handle the request */
              PrintService[] services =
                   PrinterJob.lookupPrintServices();
              if (services.length > 0) {
                   System.out.println("selected printer " + services[0].getName());
                   try {
                        pj.setPrintService(services[0]);
                        pj.pageDialog(aset);
                        if(pj.printDialog(aset)) {
                             pj.print(aset);
                   } catch (PrinterException pe) {
                        System.err.println(pe);
         public int print(Graphics g,PageFormat pf,int pageIndex) {
              if (pageIndex == 0) {
                   Graphics2D g2d= (Graphics2D)g;
                   g2d.translate(pf.getImageableX(), pf.getImageableY());
                   g2d.setColor(Color.black);
                   g2d.drawString("example string", 250, 250);
                   g2d.fillRect(0, 0, 200, 200);
                   return Printable.PAGE_EXISTS;                         
              } else {
                   return Printable.NO_SUCH_PAGE;
         public static void main(String arg[]) {
              Print2DPrinterJob sp = new Print2DPrinterJob();

    i have experienced the same problem as you - inability to print to a particular printer on linux. this appears to be a bug - if you look closely at what is happening, you get the following exception thrown when you try to print to any printer other than the default one (however, by default it will just recover and print to the default printer so you won't see this exception unless you force it by trying to do a print service lookup with no attributes set). I have not had any luck gettign around this. CUPS does not help either - i have installed CUPS and still see this behavior. Let me know if you have found a workaround.
    - Dan Kokotov
    javax.print.PrintException: java.io.IOException: Bad file descriptor
         at sun.print.UnixPrintJob.print(UnixPrintJob.java:485)
         at PrintTest.printJava(PrintTest.java:67)
         at PrintTest.main(PrintTest.java:16)
    Caused by: java.io.IOException: Bad file descriptor
         at java.io.FileInputStream.readBytes(Native Method)
         at java.io.FileInputStream.read(FileInputStream.java:191)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
         at java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at sun.print.UnixPrintJob.print(UnixPrintJob.java:477)
         ... 2 more

  • How to print from linux to Mac printer using cups - password?

    I think that I have done the correct things to share my printer from my OS X 10.4 Mac mini (my MacBook is happy to print on the Mac mini printer), and my Ubuntu Linux computer seems to be ready to print using cups. Linux can see the printer on Mac mini, but when I try to send a print job the Mac refuses access. I assume the problem is that the Linux computer needs to send the Mac a password, but I don't know how to do that -- where in the sequence of information coming from the Linux computer the password should be, what format, how to get the Linux computer to send the info through lpadmin or the GUI. All that.
    Can anyone help? Preferably with step-by-step instructions for the complete idiot. I have seen FAQs on printing, but there is no information about passwords. And most are focussed on smb rather than cups.

    I use linux and print through the Mac - but I don't have the trouble you are describing.
    There are 2 places to enable print sharing on Mac - have you done both of those?
    What protocol are you using - the easiest for CUPS is IPP (port 631). I have an Ubuntu computer at home - describe exactly how you add the printer and I'll be able to follow through.

  • Printing from linux machine to Mac shared printer?

    I have a brand new Brother MFC 6800 that is connected to my Mac (10.4.4) via USB. I have a Linux box at home (Mandriva 2006), and I'd like to be able to print through the network to this printer.
    I've been searching the web for instructions for how to set up CUPS and/or SMB to allow me to print this way, but have only come up with a few tangential references. Almost everything I've found is how to print from a Mac to a Linux print server. I want to do the opposite.
    I'm handy enough with Un*x to edit config files, but not handy enough to know what to put in there. I'd appreciate anyone who can point me to a site that might show me how to do it.
    Quicksilver   Mac OS X (10.4.4)  

    Hi Chris,
       I've not done this with a Mac but CUPS is CUPS. Open the /etc/cups/client.conf file on your Linux machine and change the ServerName line to point to your Mac. That may be all you have to do because the Mac's CUPS automatically adds the local printer for you. You may have to define a queue for it; I'm not sure but I don't think so. Also, you will probably have to authorize it on the Mac. The /etc/cups/cupsd.conf file on the Mac should have a line in it that look like:
    Listen <Mac_IP>:631
    where <Mac_IP> should be replaced by the IP address of your Mac, (not 127.0.0.1) and similarly for <Linux_IP> below. Such a line should already exist for 127.0.0.1. Just copy-and-paste in a new copy of this line and change the IP address. Inside the definition of root directory you similarly may need to add an "Allow From" statement:
    <Location />
       Allow From <Linux_IP>
    </Location>
    The directory definitions are modeled on similar definitions in Apache's httpd.conf file. There may be more that is necessary; I'll see if I can find more specific information that I've saved. If you have to do more, please post it to this thread so that there is complete documentation for others. Of course a consistent configuration depends on having static IP addresses on your local network.
       I'm not really surprised that you didn't find much if you searched for strings including Mac or Apple; this is a purely UNIX question. The CUPS administration documentation can be found online at cups.org or even on your own machine at http://localhost:631/ or on your drive in the /usr/share/doc/cups directory.
    Gary
    ~~~~
       It's no surprise that things are so screwed up: everyone
       that knows how to run a government is either driving
       taxicabs or cutting hair.
             -- George Burns

  • Pdf printing with linux client

    hi,
    i'm working with a SuSE 9.3 Client and I want to use PDF-Printing with the Acrobat Reader. With Windows Xp it works fine, but if i choose the PDF-Printer with the Linux-Client nothing happens. The PDF-Job exist in the cue. What do i have to do that it works?
    P.S. I`am from germany ;-)

    Thanks! But on which machine do i have to put the lp command?
    Application-Server?
    Tarantella Server?
    Client?
    I have put it on my Client! But nothinng happens.
    My PATH --> /home/me/bin:/usr/local/sgdee:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/qt3/bin
    my script -->
    me@my-notebook:~> cat /usr/local/sgdee/lp
    #!/bin/bash
    LPINFILE=/tmp/.nclp.$$
    PATH="/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin"
    export PATH
    [ -f $1 ] && mv $1 $LPINFILE
    [ -f $2 ] && mv $2 $LPINFILE
    echo "Print: $* -> $LPINFILE" >> /tmp/nclog.`logname`
    echo "/usr/bin/xpdf -display $DISPLAY $LPINFILE; rm -f $LPINFILE" | at now
    exit 0
    me@my-notebook:~>

  • Air Print to any printer - using linux cups server

    For those folks who may have Linux boxes with a printer configured, you can make this printer available for air print using a tweak to your CUPs config and adding an avahi service. Details are here (no need to download & purchase additional software)
    http://hartlessbydesign.com/blog/view/197-airprint-with-ubuntu-1010
    I tested this procedure myself on a Canon MP140 printer sending a print job from the photos App on an iPad. It took a couple of refresh attempts to find the printer but once it did, print jobs sent just fine.

    I do not have the exact printer model that you have, but have used several HP wireless printers that all work just fine with an AirPort Extreme.
    Your wireless printer will connect to the wireless signal provided by an AirPort Extreme.....or any other wireless router.....just like any wireless device would connect to a network:
    1) Identify the network to be joined during setup
    2) Enter the wireless password to connect to the network

  • Can't print to cups printer on linux

    Hello,
    in my application I use a StyleReport to print data from database.
    On windows everything work fine.
    Because I want my app to be plattform independend I've installed debian on a workstation and a cups lpd printer.
    I can use that printer with mozilla or lp command.
    Normally I wanted to print that way (easiest verion in the StyleReport- Docu)
    ReportSheet report = builder.read("");
    PrintJob pj = tk.getPrintJob(new Frame(), "Trommeletikett", null);
    tk.getPrintJob(new Frame(), "Trommeletikett", null);
    report.print(pj);This is working on windows.
    On Linux I get a print-dialog shown, but if I click on "ok" nothing happens.
    Now to fix the problem I do something strange:
        if (osVersion.indexOf("Windows") == -1)
                            PDFPrinter pdf = new PDFPrinter(new java.io.File(
                                    "/tmp/" + CoilId + ".pdf"));
                            pdf.setPageSize(StyleConstants.PAPER_A4);
                            report.print(pdf.getPrintJob());
                            pdf.close();
                            Runtime.getRuntime().exec("lp /tmp/" + CoilId +
                                                      ".pdf");
                        }Means if linux, first create a pdf file on /tmp and than running the lp command against that document.
    However this code is working, but really not nice.
    Any idear why the first (normally plattform independ) code is not working?
    Thanks pelle23

    Well, it seems there is a bug in the JVM or Ghostscript...
    What is your version of Ghostscript?

  • Printing to Linux CUPS in Landscape - NOT Fixed

    If I tried to print to my HP printer (attached to my Linux box) in Landscape mode, it'll print it in Portrait instead. This was the problem in all previous version of the OS.
    If you print the doc out in pdf and lp from the command line, it prints fine in Landscape.

    I'm having the same problem. I have a Lexmark x9350 that is shared through Airport Extreme.

  • Cd printing under Linux (Pixma MG5350)

    Hi all,
    I've bought a Canon Pixma MG5350 just a few weeks ago.
    It works great but this week I've tried to print with the CD-tray.
    I have made a nice label using Glabels, and set the printing configuration as followed:
    Paper tray: CD tray
    Paper size: CD 5-inch
    Resolution: 600x600 DPI high cd
    Then the printer indicated that I need to push the tray in the slot and press OK. After that it will ask the same thing again, again and again without doing much. I've tried every single adjustment if it comes to inserting the cd-tray but the machine just wont insert it.
    Hopefully some of you can give me advise on this one. Probably I am overlooking something but don't know what. Can it be that this feature is not working under Linux? (hope it will)
    Operating details:
    Kubuntu 13.04 64bit
    Printer driver: Canon Pixma MG5300 - CUPS+Gutenprint v5.2.9
    Kind regards,
    Jurgen

    Great, thanks for the quick reply. I will keep this post open for now and at the same time fill in a form on the canon site for Europe. If I understand what is going wrong I will post it here as well.
    jurgen

Maybe you are looking for

  • Installer Group: This is what it takes to do a network install of labview.

    Here is the install.bat file we made to do this.  Keep in mind, this just “appears” to install everything listed in it correctly as a clean install.  Proton is our network drive.  @Echo Off @Echo Starting Labview 8.2 Installation \\Proton\LoginUpdate

  • ILife '06 Books and Calendars broken in iLife '08

    I just installed iLife '08, and immediately installed the iPhoto 7.0.2 update before launching the app. Now, all of the books and calendars that I created in in iLife '06 are broken. The formatting is certainly incorrect for the books and calendars,

  • Creation of a new Authorization object

    Hi , I need to create a new Authorization group and add three existing tables to it. Kindly suggest a way. Regards.

  • Search multiple folders and muiltiple files and combine to single file

     I want to search multiple folders for muliple files and combine to single file name. The files I'm searching have same format, but where named differently in each of there processes. Now I want to combine based upon -SearchFor .. I'm having a proble

  • Connection Timeout error message - HELP!

    Hi, I am so fed up with my internet connection....so here is my story.... I live above a shop in a rented flat which is owned by the shop owner, he kindly gave me the password for his router so I could use his internet free of charge. This has worked