Set filename when rendering archive files

When viewing the archive files Viewer displays an archive filename in the header of each page, like it is shown on the screenshot above. By default, the name of the original file is used. The GroupDocs.Viewer for Java enables you to change or hide filename by setting setFileName() option of the ArchiveOptions class. The setFileName() option can be set to:

The following code snippet shows how to set “my filename” instead of source filename when viewing an archive file.

try (Viewer viewer = new Viewer("")) {
    PdfViewOptions viewOptions = new PdfViewOptions();
    viewOptions.getArchiveOptions().setFileName(new FileName("my filename"));