LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,576

Rep: Reputation: 179Reputation: 179
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



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:37 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration