US and Worldwide: +1 (866) 660-7555
Results 1 to 3 of 3

Thread: preview problem with Linux

  1. #1
    Join Date
    Apr 2007
    Posts
    1

    Default preview problem with Linux

    Hi, i am working with jfreereport 0.8.7. Our application runs on windows xp and linux. The problem we have is that opening a printpreview frame with xp takes less than a second but if you open exactly the same frame with linux it takes more than 10 seconds.

    If the property org.jfree.report.NoPrinterAvailable=true is set it works fine till you open the printer dialog over the printpreview menu file/print... After that you wait again that long untill you see the previewframe.

    I'm printing on linux with CUPS 1.1.

    Is there a possibility to speed up jfreereport or can that problem be solved altering a CUPS parameter?

  2. #2

    Default

    Hi,

    I am not able to give you a direct answer but I know java (and we) have 2 printing systems (java.awt.print and javax.print) so did you try to use the modern printing module located in jfreereport-ext?
    I don't know much about it so look on the furum first if you have problem with using it. By the way this should not be a problem from JFreeReport but a Java/Linux/Cups one so you should also check about similar problems on you prefered search engine.
    May the Moo force be with you,
    Said Mimil

    A student of JFree & Pentaho Academies,
    Cedric Pronzato

  3. #3
    Join Date
    Mar 2003
    Posts
    7,560

    Default

    Hi,

    any printing system of all JDK 1.4 or higher uses the Javax.printing API. On these JDKs, the old AWT printing system is just a wrapper around the javax.print API.

    That new API is great - but the implementation is .. horrible (to put it politely). They have two modes: Mode one is: Use the local BSD printing system through the well known tools (lpc, lp, etc). Mode two is: Use HTTP to connect to the Cups printer.

    You should definitly check your local CUPS configuration, as the JDK simply calls the well known command line tools for printing. If you're running an english version*, you can try to install the CUPS 'lpc' tool (should be in the BSD-printing compatiblity package). If you use the HTTP-method, check your network settings, and if possible disable the IPv6 support in the JDK (as this also causes trouble due to a unresolved JDK bug).

    Add "-Djava.net.preferIPv4Stack=true" to your 'java' command line.
    http://bugs.sun.com/bugdatabase/view...bug_id=5109523

    Have fun,
    said Thomas

    * Java attempts to parse the output of that tool. If your linux translates this into a different language, this primitive parsing fails. And no, they do not set the LANG environment variable to english before starting the 'lpc' tool.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •