`>` character on all pages of PDF documents

Hello, we have a licensed GroupDocs.Viewer for Java version 23.4 library, and all our PDF documents are rendered (in HTML, using the Angular 15 component that I mentioned in another post here) with a > character on the top left of each page, as in the attached screenshot:
Screenshot-20230609094218-196x138.png (1.7 KB)

When looking at it in the Chrome Elements panel, it looks like this:
Screenshot-20230609094424-371x145.png (12.9 KB)

Any ideas?
Thank you

@digeomel

It looks like an artifact from a template file e.g. some closing tags may have two >> characters instead of one. We’ll take a look and update you.

1 Like

@digeomel

We have reproduced and fixed this issue. The fix will be in the GroupDocs.Viewer for Java 23.6.

As a temporary workaround you can add the following code to remove the character from the HTML to the service you’re running.

String html = getPageContent(page.getNumber(), cacheDocumentDirectoryPath, printVersion);
if(viewInfo.getFileType() == FileType.PDF) {
    final StringBuilder content = new StringBuilder(html);

    final String title = "</title>";
    final int startIndexOfTitle = content.indexOf(title);
    final int endIndexOfTitle = startIndexOfTitle + title.length();
    final String chr = content.substring(endIndexOfTitle + 4, endIndexOfTitle + 5);
    if(chr.equals(">")) {
        content.deleteCharAt(endIndexOfTitle + 4);
    }

    html = content.toString();
}
pageData.setData(html);
1 Like