• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Modifying pdf with itext

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

if I imagine I have a byte array containing an existing pdf I've read from the filesystem, and some text I want to insert into the pdf at a select point, is it possible to produce a byte array containing the new pdf with the text at the set point using itext?
In this particular example, I have a pdf letter template, and am wanting to put the adress of the recipient in the address area of the letter. Some code detailing how to do this with iText would be greatly appreciated.

thanks!
Andrew
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is not possible with iText or any other PDF library. Once a PDF document has been created, the range of things you can do with it is very limited. There is no reliable way to access parts of a page.

If the document uses AcroForms, then you can use iText to fill in the fields of the form. But in general this doesn't work.
[ January 27, 2006: Message edited by: Ulf Dittmer ]
 
Police line, do not cross. Well, this tiny ad can go through:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic