I am working on the use case where end user fill the pdf document and click the push button to generate the barcode with field values… I am looking for the solution in PDFBox or IText7 or Aspose….
I have created the editable pdf document using the above mentioned references.
I have tried in itext7 and PDFBox but no luck
An Adobe Acrobat Reader user can easily import a barcode by several means. However the simplest to program will possibly be via an external import as a comment that they can drag about the page as here.
Attempting to generate such codes inside Acrobat is possible but highly problematic for 2D or QRcodes. (Dynamic Forms methods involving complex scripting should be avoided as depreciating)
The import can be done unattended programmatically same as all form field generations, using the same text file to invoke Acrobat reader.
The biggest programming hurdle with this approach is how to program the image as
for black and
ÿ
for white, based on data content.Have a play with this data file by changing the filenames and other values then a double click on TEXT.FDF should get Reader to open the two files together, such that the PDF wraps around the image.
You can also modify the text file while PDF is open with a different barcode and the second will replace the first in front of your eyes !! Just beware a wrong image will wipe out the first and throw an error message.
So just to prove it works. I shuffled the pixels without any other messing about and we get my bad pixel layout, you of course will use a correct altered image.