I tried with 2.0.24. The fields are still there. SourceFailure is the important 
one.
-------- Original message --------From: Tilman Hausherr <[email protected]> 
Date: 6/24/21  08:46  (GMT+01:00) To: [email protected] Subject: Re: 
Flattening Part 1 Am 24.06.2021 um 08:03 schrieb Ranjeet Kuruvilla:> Wait a 
minute: Did you save it to file or did you transform it into> byte[]. I can not 
save it into a file!I saved it into a file:doc.save(new 
File("XXXXX","SourceFailure-saved.pdf"));Tilman>> On 24.06.21 05:52, Ranjeet 
Kuruvilla wrote:>> I was aware of that. I prepared an example jar and a 
project, but that>> project was larger than 1MB and so I was unable to send 
it!>>>>>> Thank you for the help. I will try it out.>>>> On 24.06.21 05:50, 
Tilman Hausherr wrote:>>> I tried this code on the 3.0 version on the 
SourceFailure.pdf file.>>>>>>          PDAcroForm acroForm = 
doc.getDocumentCatalog().getAcroForm();>>>          List<PDField> list = new 
ArrayList<>();>>>          for (PDField field : acroForm.getFieldTree())>>>     
     {>>>              list.add(field);>>>          }>>>          
acroForm.flatten(list, true);>>>>>> and after saving I got a fully flattened 
file. Please try that with>>> 2.0.24. Your zip file needs us to analyse > 500 
lines of code and set>>> up a project with dependencies.>>>>>> Tilman>>>>>>>>> 
--------------------------------------------------------------------->>> To 
unsubscribe, e-mail: [email protected]>>> For additional 
commands, e-mail: [email protected]>>>>> 
--------------------------------------------------------------------->> To 
unsubscribe, e-mail: [email protected]>> For additional 
commands, e-mail: [email protected]>>> 
---------------------------------------------------------------------> To 
unsubscribe, e-mail: [email protected]> For additional 
commands, e-mail: 
[email protected]>---------------------------------------------------------------------To
 unsubscribe, e-mail: [email protected] additional 
commands, e-mail: [email protected]

Reply via email to