• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

feeding byte[] to crreate a pdf

 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
did anybody try using grails pdf plugin? I need to create a pdf from a byte[] and I found this plugin. I'm not sure if this plugin is appropriate for the task. Any on the topic will be much appreciated. Thank you.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What plugin? Do you have a link?
 
liliya woland
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got the plugin by running this command:grails install-plugin pdf 0.6

I gave up the idea of using the plugin, it is good for opening already on a disk files, pdfs anf gsp. But I have a byte[], so I'm using now iText instead. I got the functionality of viewing a pdf ready, but still struggling with getting my byte[] into it.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you know that most plugins are documented on the Grails web site? They have a plugin portal where you can search for plugins and read all about them.

http://www.grails.org/plugin/home
 
liliya woland
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I looked through the demos of that plugin. I'm attempting to feed my byte[] into a PdfWriter at the moment.
 
liliya woland
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is my solution. It's bare bones, but it works:
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
FWIW, Qoppa Software delivers Java libraries to do most functions with PDF files. Code samples and demos of each of the libraries are readily available, so you can quickly decide if an individual library might help you.
 
liliya woland
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, I'll keep it in mind, although the tools didn't look like open source libs. I worked with iText on several projects, years apart, and I have to say, this time around the only issues we had was figuring out where to keep the lib for groovy projects. Locally I store it in Groovy/lib folder and all calls work like magic, but once we moved my code out to Amazon server, we a had hard time deciding where to keep them - the jar iText file. Import statements for "import com.lowagie...." were failing, someone else figured out that "import com.itext...." or something like "import com.pdfitext...." would work instead. So we took that direction for import calls, then the only lib that didn't compile was the Font lib, not sure why, but the simplest thing at that point was to get rid of the references to that particular lib. Very strange, but I'd still recommend iText
 
reply
    Bookmark Topic Watch Topic
  • New Topic