LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-15-2009, 02:45 AM   #1
mfoley
Member
 
Registered: Oct 2008
Posts: 67

Rep: Reputation: 15
problems with jsp and PDFBox


If any linux users have experience with PDFBox and jsp I could really use some help. I have the following program:

String inputFile = "/www/tomcat/webapps/courtscan/OH/demo/documents/2009/1-60.pdf";
String outputFile = "/usr/local/apache/htdocs/new.pdf";

PDDocument doc = PDDocument.load( inputFile );
out.print(doc.getNumberOfPages() );
doc.save( outputFile );
doc.close();

Simple, really, but it doesn't work. The output file created won't open in Acrobat and gives an "Insufficient data for an image" error message. It does create the file, though not the same size as the original. I can't see anything wrong with the code.
 
  


Reply

Tags
java, jsp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run JSP? Mathsniper Debian 1 08-27-2005 07:40 AM
urgent help on JSP anirudh Programming 8 08-17-2005 04:54 PM
VB to JSP jayakrishnan Linux - General 3 05-08-2002 12:28 AM
ISP with JSP?... BCE_HAMAHA General 2 04-09-2002 12:30 PM
jsp deepak Programming 0 04-18-2001 09:49 AM


All times are GMT -5. The time now is 01:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration