File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

feeding byte[] to crreate a pdf

 
liliya woland
Ranch Hand
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What plugin? Do you have a link?
 
liliya woland
Ranch Hand
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • 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
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my solution. It's bare bones, but it works:
 
Susan Sims
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic