@Test
public void visualizeCitations() throws Exception {

      File f = new File("/Users/zholudev/Downloads/The_planetary_system_Web_30_active_documents_for_S.pdf");
      File f = new File("/Users/zholudev/Downloads/Lack_of_in_vitro_constitutive_activity_for_four_pr.pdf");
    File f = new File("/Users/zholudev/Downloads/AS-432836994965504@1480207789262_content_1.pdf");
      File f = new File("/Work/temp/figureExtraction/5.pdf");
    GrobidAnalysisConfig config = new GrobidAnalysisConfig.GrobidAnalysisConfigBuilder().generateTeiCoordinates(Lists.newArrayList("ref", "biblStruct")).build();
    Document doc = engine.getParsers().getFullTextParser().processing(DocumentSource.fromPdf(f, -1, -1, false, true, true), config);
    PDDocument document = PDDocument.load(f);
    document = CitationsVisualizer.annotatePdfWithCitations(document, doc, Collections.<String>emptyList());
    File out = new File("/tmp/citAnn.pdf");
    document.save(out);
    if (Desktop.getDesktop().isSupported(Desktop.Action.OPEN)) {
        Desktop.getDesktop().open(out);
    }
}