-
Notifications
You must be signed in to change notification settings - Fork 241
Debugging against PDFBox
Eliot Jones edited this page Jan 15, 2022
·
1 revision
If you need to debug and compare content stream processing or other file content processing against PDFBox you can clone PDFBox locally and set the following main
method to launch in the IntelliJ debugger once you have changed the file path to one you want to use locally:
For example:
public static void main(String[] args) throws IOException
{
File file = new File("C:\\temp\\pdfs\\", "document with error.pdf");
try (PDDocument doc = Loader.loadPDF(file))
{
PDPage page = doc.getPage(0);
CustomGraphicsStreamEngine engine = new CustomGraphicsStreamEngine(page);
engine.run();
}
}
You will need to install Maven and do a clean install before opening/using the code in Intellij: