Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Covert a PDF to PDF/A format using iText

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to convert PDF files to conform to PDF/A format.
How can I achieve this? Can I use iText.jar for this?
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think so; iText is for creating PDFs, not for making structural changes after the fact.
 
Anup Bansal
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried iText by first reading a PDF and then re-creating the PDF with the PDF version set 10 1.4 and conformance set to PDF-1A.
I validated the generated PDF using an external tool but it gave some issues.

Following is the snippet of the code:


Could you please suggest me other ways of achieveing this?
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Setting version and conformance levels in iText does not alter a document; it merely specifies what operations are allowed from that point on. So it doesn't have the desired effect in this case.
 
Anup Bansal
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I achieve this format conversion? Is there any other jars available for the same?
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not to my knowledge; certainly no freely available ones. PDF is not amenable to a lot of changes after its creation; while some modifications are possible, structural alterations within pages generally aren't.

It's possible that Adobe has a native library you could license for this purpose.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi it is very helpfull your code example... over a many tests, finally i could transform an older version  Pdf from Version 1.1  to pdf A-1b format..
here is the lines
first create a simple proyect whit no interfaces and next, import the itext librarys in my case i use 5.5.9 then i create a class whit this code


}

 
Marshal
Posts: 66129
250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I added code tags to your post. Always use the tags; you can see how much better it looks
 
A timing clock, fuse wire, high explosives and a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!