Geertjan's Blog

  • May 25, 2006

More News on iText and NetBeans IDE

Geertjan Wielenga
Product Manager
I've set things up so that now, by default, the PDF that you create via iText (using a menu item in the NetBeans Editor) is created in the same folder as where the original document is found. So, here I've created a PDF file for a selection from the CreatePDF.java file:

However, if the PDF Creation Folder is set (as explained in yesterday's blog entry), then that folder overrides the default folder. If you want to see the code that makes this possible, click here to get a PDF document that I created using this iText integration. (And, instead of browsing for a folder, you can use a new button provided by Sandip's excellent "CopyPath" module, which I learnt about at his brilliant module development hands on lab at JavaOne; just select a node, click the button, and the path leading to the node is saved on the clipboard, so that you can paste it in the Options window extension discussed yesterday.)

By the way, I could equally create a PDF file for any other file type. It doesn't necessarily have to be a Java file, in other words. That's because I added the action to this folder (by drag and dropping it from where it was within the text/x-java folder):

And... great news: I discovered http://www.lowagie.com/ today, which turns out to be the site of the creator of iText. Unsurprisingly, since all good things come from there (cf. Wicket), he's from... the Netherlands! (Or, maybe, he's from Belgium. Some of his word choices seem a bit Flemish. Ah well, Belgians are okay too.)

Join the discussion

Comments ( 4 )
  • Antonio Thursday, May 25, 2006
    Thanks Geertjan!! This is soo cool!!

    A simple suggerence: what about creating the PDF under a "doc-files" subdirectory? That way that would automagically be transported to the javadoc directory for further reference...


  • Thiago HP Thursday, May 25, 2006
    We could also create PDF bookmarks for each class, method, of field declaration. One example is here: http://itextdocs.lowagie.com/tutorial/objects/bookmarks/index.html#bookmarks.

    Well, the possibilities are almost endless. :)
  • Thiago HP Thursday, May 25, 2006
    Ooops, I forgot to mention JXR, a Maven plugin that generates cross-referenced, syntax colored source code in HTML. One sample is http://myfaces.apache.org/impl/xref/index.html. Clik on any package and then in any class.
  • Geertjan Friday, May 26, 2006
    Hi Antonio. That's a nice idea, thanks!

    Hi Thiago, thanks, I'll look into those resources. Being able to maintain syntax highlighting would be fantastic.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.