1

I got quite complicated ready pdf file. It has got barcode and fancy looking table.

I have to create based on it application which will generate pdfs that will look the same but contain different records in the table and different barcode.

Is it possible to copy existing pdf and just change content of barcode and table ?

What would be the best approach to create the same looking pdf but with different content ?

Whank You very much for help

Luiggi Mendoza
  • 85,076
  • 16
  • 154
  • 332
gruber
  • 28,739
  • 35
  • 124
  • 216
  • PDFs are not a document structure format, they're not meant to serve as the input to any sort of processing besides displaying on a screen, or printing. (Maybe extracting text but it's possible to create a PDF that looks right but doesn't contain sane textual information.) The only convenient editing you can do on them is removing / adding / otherwise rearranging pages. The barcode could be painted over as well if it's a single image object. Adding and removing rows to an existing table (i.e. not painting over them) is probably functionally impossible. – millimoose Nov 15 '13 at 20:15
  • 1
    I don't think the requirements are clear. Do you need a brand new PDF with unrelated data, but in the same format (barcode + table)? Or is the data in the new PDF relevant to the first one, or are you trying to simply edit an existing PDF? – sab669 Nov 15 '13 at 20:17
  • I need a brand new PDF with unrelated data, but in the same format (barcode + table) – gruber Nov 15 '13 at 20:23
  • 1
    It might help if you provided the pdf in question. – mkl Nov 16 '13 at 00:05

1 Answers1

2

If the barcode and table are static I would open it in photoshop or illustrator delete everything I dont want, Then save it as a pdf again. Then follow this guide iText - add content to existing PDF file and use it as a template to put my custom content in.

If the table and bar code are dynamically generated (each one is different) and you need to crop out content on the fly I would pull some hacky crap and draw white squares over all the content I want gone. then proceed to use it as a template.

Just my 2 cents given the information provided.

Community
  • 1
  • 1
ug_
  • 11,267
  • 2
  • 35
  • 52