Hi I found this example of pdfbox using annotation:
When I try to run it in netbeans, nothing happens except to print in output:
Usage: add_annotation_exp1.Add_annotation_exp1$AddAnnotations
Not sure what I am doing wrong
Hi I found this example of pdfbox using annotation:
When I try to run it in netbeans, nothing happens except to print in output:
Usage: add_annotation_exp1.Add_annotation_exp1$AddAnnotations
Not sure what I am doing wrong
There are two possible solutions (based on Netbeans 8.2):
1)
In the main
method, add this at the beginning: args = new String[]{"c:/path/filename.pdf"};
and then build the subproject and then press SHIFT F6 to run, or right-click in the editor pane and choose "Run File". (If the subproject is open then you can skip the build step)
2)
Go to the subproject properties (right-click on the left pane on "Apache PDFBox examples"), "Properties". A dialog box will appear. Choose "run" in the left pane. In the field "Main Class" enter org.apache.pdfbox.examples.pdmodel.AddAnnotations
(or use the "Browse..." button), and in the field "Arguments" enter your file name with the path. Use quotes if there are spaces in the path. Then run by clicking the right mouse key on the subproject and choose "Run".