mardi 15 juin 2021

Display the checkboxes in the console using java

I have many pdf files and I need to extract the entire test from those files and display it in the console. I can do that easily using PDF box and I was able to print that in console. But some files have many checkboxes for e.g it displays frequency: []1year []monthly []3 years like this way and one of the boxes is crossed(checked). But the problem is in console its showing like this: frequency: 1year monthly 3years the checkboxes are not getting printed. I have searched everywhere and all are showing how to create a checkbox but I dont need that. I just want to display it and then I have to find out what is the frequency. How to do that? Given here is my code to extract pdf data:-

PDDocument doc=PDDocument.load(file);

PDTextStripper pdfStripper=new PDTextStripper();

String text=pdStripper.getText(doc);

System.out.println(text);




Aucun commentaire:

Enregistrer un commentaire