how to modify form object stream?
zhongguogu opened this issue · comments
zhongguogu commented
https://github.com/mkl-public/testarea-pdfbox2/blob/master/src/test/java/mkl/testarea/pdfbox2/content/RemoveText.java#L49
`
public void processForm(PDFormXObject form) throws IOException {
final PDStream formContentStream = form.getContentStream();
final PDResources resources = form.getResources();
formReplacementStream=formContentStream.createOutputStream(COSName.FLATE_DECODE);
formReplacement = new ContentStreamWriter(formReplacementStream);
super.showForm(form);
}
`
how to update the PDFormXObjects' stream?
zhongguogu commented
"Indeed, I would create a new form XObject and replace the reference to the old one in the page resources by a reference to the new one"
mkl commented
Please share an example PDF for testing that.
mkl commented
Closing due to missing response