my dog learned polymorphism*
The moose likes Java in General and the fly likes Reading and editing PDF in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Reading and editing PDF in java" Watch "Reading and editing PDF in java" New topic

Reading and editing PDF in java

Balasubramaniam Muthusamy
Ranch Hand

Joined: Nov 30, 2010
Posts: 51
Hello Everyone,
I would like to read PDF file and write into another PDF file without changing the font,alignment,images and everything. I may delete or insert few lines based on my validation. Could you please someone help me on this? i tried with pdfbox and itext but i couldn't get it done as they are reading as image. Please help me out.

Hauke Ingmar Schmidt

Joined: Nov 18, 2008
Posts: 433
PDF is not exactly a format for editing... but you can do manipulations to a certain degree with iText, i.e. you can add blocks or fill out forms.
Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

It's possible that whoever produced the PDF you have actually did produce it using images instead of text. In which case converting the images back to text is an extremely difficult task which can't be done by either of those packages.

It is sorta covered in the JavaRanch Style Guide.
subject: Reading and editing PDF in java
Similar Threads
Does anyone know how to convert from pdf to html
Jasper Report
How to Convert a file into pdf in java
Creating a file from Various chunks of different files in java
MasterExam and other MockExams of K & B