• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Covert a PDF to PDF/A format using iText

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic