Slashdot Mirror


C++/Java Postscript Libraries?

myrkul asks: "I'm working on an application that takes vector graphics, text, and bitmapped pictures as well as layout info from a database, and converts it to postscript (PDF would work too) for printing. I've been looking for (preferably free) Postscript libraries for either C++ or Java which would allow me to lay out these elements, and haven't had much luck. Any suggestions?"

11 comments

  1. NeXT by dnxthx · · Score: 2

    I could be remiss on this, but didn't NeXT cubes render to the display via Postscript commands? If this is so, then perhaps some component of GNUStep might help? Perhaps someone more deeply involved in OpenStep/GNUStep can comment.

  2. Java can send directly to printer by N-Wing · · Score: 2

    Does it have to be PostScript first, or can you just print to the printer? If it doesn't have to be PostScript, Java 1.2 makes it pretty easy to print. Sun's tutorial diplays some graphics to the screen, then prints it.

    --

    --== [N] ==--

  3. Incoming by Anonymous Coward · · Score: 1

    http://freshmeat.net/projects/pdflib/

  4. pdflib ... by iMMersE · · Score: 4

    ... will allow you to generate PDFs from

    ActiveX/COM for use with Visual Basic, Active Server Pages, Delphi etc.
    ANSI C
    Class wrapper for ANSI C++
    Java (via Java Native Interface, JNI), including servlets
    Perl
    Python
    Tcl

    There is also a pdflib extension to PHP.

    You can find it here

    I hope this helps.

    .iMMersE

    --
    codegolf.com - smaller *is* better.
  5. Thanks by myrkul · · Score: 1

    Hmm, I'll look at all the suggestions posted here... I really appreciate the input.

  6. Not free, but still good for Java by RhetoricalQuestion · · Score: 1

    Check out KL Group's JClass PageLayout. Quoting from the product page, it will "Output directly to the Java AWT Printer, Acrobat PDF, HTML, PostScript Level 2, or PCL 5."

    I admit that I'm biased, but it's still worth checking out the eval.

    --

    I can spell. I just can't type.

  7. Options by FigWig · · Score: 3

    For Java you can use retepPDF

    For C++ you can use ClipPDF.

    retepPDF is GPL, ClipPDF has its own license.

    --
    Scuttlemonkey is a troll
  8. Almost forgot -- there's one for C++ by RhetoricalQuestion · · Score: 1

    This is primarily available on *NIX, but KL also has a C/C++ component called PageFormatter which has very similar functionality to JClass PageLayout.

    Once again, it's not free and I admit that I'm biased, but it's still a good tool, and it can't hurt to download an eval to see for yourself.

    --

    I can spell. I just can't type.

  9. Check out Netscape IFC by andyturk · · Score: 1

    There's a really great Java UI library (different than Swing and AWT) that does lots of neat things. It was distributed by Netscape and is freely available with source.

    Read about Netscape IFC here: http://developer.netscape.com/docs/manuals/ifc/hom e.html

    Although not part of the original IFC distribution, I know that someone wrote a subclass of netscape.application.Graphics that generates Postscript/PDF instead of drawing on the screen.

    IFC uses a very similar architecture to the old NeXT toolkit (since IFC was written by ex-NeXT folks). IFC even comes with the Constructor application to lay out your UI. Amazing stuff.

    Unfortunately, I'm not sure where to find the Postscript output code, but someone else might know.

  10. XML FOP by alenp · · Score: 1
    If PDF will do (which is, of course, directly convertible to PS), you might want to look at the XSL:FOP, which is supported by the Apache XML group xml.apache.org.

    They have C and Java libraries which serve this stuff up from XML files in real time via the webserver, but the cool thing is that these libraries also contain stand-alone tools for converting XML to PDF via XSL:FOP. I've used it to produce invoices for web orders. It works great.

  11. Many thanks by myrkul · · Score: 1
    Hey, thanks a lot guys!
    Also, to clarify a few things - there is no need to do this real time, on the fly, etc - the main purpose of this app is to take some information from a database, and use that info to lay out text, images, horizontal and vertical lines, as well as gradients and filled areas - in full color, at a very very high quality.

    Anyways, I'm looking around at the links that were posted - some very nice stuff in here!

    Jonas Courteau