GroupDocs.Viewer for Java 3.7.0 Release Notes

Major Features

There are improvements and fixes in this regular monthly release. The most notable are:

  • Introduced option to specify custom fonts path.
  • Introduced new methods for working with email attachments.
  • Introduced new methods for getting info for remotely located document or document in the form of stream.
  • Introduced ability to clear cache.
  • Introduced options to set opacity setting for watermark in html mode.
  • Improved rendering performance.
  • Improved rendering performance.
  • Improved applying watermark performance.
  • Improved GetPdfFile method usability and performance.
  • Implemented saving Cells document sheet to multiple pages in image mode.
  • Ability to specify font for watermark.
  • Add support for Spanish locale.
  • Add support for Italian locale
  • Hide/Show the hidden pages for Visio files
  • Ability to set default font when rendering Cells and Words documents
  • Ability to set the encoding standard automatically
  • LaTeX file format viewing support
  • Save html resources to cache without saving them to local disc
  • Improve rendering Pdf Dynamic XFA Forms
  • Ability to set default font when rendering Diagram documents
  • EMF and DICOM file format viewing support
  • Fixed html watermak rendering

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
VIEWERNET-631Add ability to specify custom fonts pathNew Feature
VIEWERNET-475Opacity setting for WatermarkNew Feature
VIEWERNET-416Get selected attachment from email documentsNew Feature
VIEWERNET-414Render attachments from email documentsNew Feature
VIEWERNET-478Pre-Render Information required of a remotely located document or document in the form of streamsNew Feature
VIEWERNET-459Provide remove old cache utility feature in the next generation APINew Feature
VIEWERNET-733 Implement saving Cells document sheet to multiple pages in image modeNew Feature
VIEWERNET-787Implement ability to specify font for watermarkNew Feature
VIEWERNET-394Support for hyperlinks referencing a worksheet in the same documentNew Feature
VIEWERNET-433Add support for Spanish localeNew Feature
VIEWERNET-435Add support for Italian localeNew Feature
VIEWERNET-639Hide/Show the hidden pages for Visio filesNew Feature
VIEWERNET-801Ability to set default font when rendering Cells documentsNew Feature
VIEWERNET-802Ability to set default font when rendering Words documentsNew Feature
WEB-2073LaTeX file format viewing supportNew Feature
WEB-1084The ability to show and hide PDF layersNew Feature
VIEWERNET-871Ability to set default font when rendering Diagram documentsNew Feature
VIEWERNET-851Implement support of EMF file type.New Feature
VIEWERNET-549DICOM format supportNew Feature
VIEWERNET-582The GroupDocs.Viewer 3.x is slower than 2.19 in performanceImprovement
VIEWERNET-641 Update DocumentInfoOptions Cells/Words/Email DocumentInfoOptions properties names and typesImprovement
VIEWERNET-640Remove duplicated document name header in Project document converted to htmlImprovement
VIEWERNET-636Remove border in html that was converted from words documentImprovement
VIEWERNET-619Implement adding prefix to font-family property if it can be overridenImprovement
VIEWERNET-614Implement transparent watermarking in html modeImprovement
VIEWERNET-600Improve performance of extracting document information in image modeImprovement
VIEWERNET-590Apply HtmlResourcePrefix to fonts mentioned in css filesImprovement
VIEWERNET-568Load document only when not cachedImprovement
VIEWERNET-557Improve temp files folder structureImprovement
VIEWERNET-558Improve processing remote files by UriImprovement
VIEWERNET-628Implement RotatePage method that returns voidImprovement
VIEWERNET-663Improve library performanceImprovement
VIEWERNET-665Improve applying watermark performanceImprovement
VIEWERNET-670Improve get pdf file performanceImprovement
VIEWERNET-674Improve GetPdfFile method usabilityImprovement
VIEWERNET-721Improve Words files to html rendering speedImprovement
VIEWERNET-732Implement saving file data separately based on optionsImprovement
VIEWERNET-748Implement releasing converters resourcesImprovement
VIEWERNET-401Improve applying pdf document transformationsImprovement
VIEWERNET-803Ability to set the encoding standard automaticallyImprovement
VIEWERNET-824Cleanup GetDocumentInfo method responseImprovement
VIEWERNET-826Remove XHTML xmlns attributeImprovement
VIEWERNET-827Cleanup html markup for Cells documentsImprovement
VIEWERNET-899Convert Pdf Dynamic XFA Form to Standard AcroFormImprovement
VIEWERNET-895Mark CachedPageDescription redundant constructor as ObsoleteImprovement
VIEWERNET-873Save html resources to cache without saving them to local disc.Improvement
VIEWERNET-616Implement GetPdfFile from stream or remote fileImprovement
WEB-1734Hide the hidden sheets for .xls fileImprovement
WEB-1107Convert a document page to JPEG in about 0.1 secondImprovement
WEB-905Links for mail attachmentsImprovement
VIEWERNET-642GetDocumentInfo Method Throws Exception in Evaluation ModeBug
VIEWERNET-632The HtmlResourcePrefix {page-number} is not set in DiagramToHtmlConverterBug
VIEWERNET-476Some characters are not showing in correct format when render as HTMLBug
VIEWERNET-591‘System.OutOfMemoryException’ thrown while rendering as imageBug
VIEWERNET-605Only first frame or tiff document converted in image modeBug
VIEWERNET-606Only first frame or tiff document converted in image modeBug
VIEWERNET-550MSG file is not rendering properlyBug
VIEWERNET-583Failed to get document information in image mode with text from epub documentBug
VIEWERNET-570Failed to get document information in image mode with text in trialBug
VIEWERNET-551File description document type format is Unknown when extension is upper caseBug
VIEWERNET-552File description document type format is Unknown when extension is upper caseBug
VIEWERNET-652Small images are not visible in image modeBug
VIEWERNET-655Invalid parameter exception while converting mpt to imageBug
VIEWERNET-659File is corrupted or damaged exception while converting mpt document to imageBug
VIEWERNET-662Project reading exception in multithreading environmentBug
VIEWERNET-681GetPdfFile returns all pages in trial modeBug
VIEWERNET-682JpegQuality is not applied for watermarked imagesBug
VIEWERNET-684Invalid Rendering of Excel File into Html and ImageBug
VIEWERNET-689Incorrect Rendering of Excel File into Html and ImageBug
VIEWERNET-690GetPages() for Email Attachment Throws Path Exception for Relative Storage PathBug
VIEWERNET-693Invalid Parameter Exception in Html RenderingBug
VIEWERNET-701GetPages() Throws Exception In Case of Stream ObjectBug
VIEWERNET-722Failed to load xps document in image mode with pdfBug
VIEWERNET-725API Renders First Sheet Twice in Excel WorkbookBug
VIEWERNET-729Incorrect Spacing between Characters in Html RenderingBug
VIEWERNET-529Cannot add page to pdf documentBug
VIEWERNET-564OutOfMemoryException raised when total readed file size reached upto 250MBBug
VIEWERNET-627The operation is not supported error raised when loading epub documentBug
VIEWERNET-667IOException is raised when try to move a loaded document(into the viewer) to any other directoryBug
VIEWERNET-691Cell shading is not applied uniformly while converting spreadsheet to HTMLBug
VIEWERNET-717Ott file stream detects as ods file formatBug
VIEWERNET-729GetDocumentInfo() Throws “Parameter is not valid” ExceptionBug
VIEWERNET-753Excel file is not properly rendering into HTMLBug
VIEWERNET-776Header contents of Word document are not appearing in rendered html or imagesBug
VIEWERNET-779Exception generated while calling handler.getDocumentInfo(uuid)Bug
VIEWERNET-780Exception when calling GetPdfFile/RotatePage/ReorderPage with guid without extensionBug
VIEWERNET-784Incorrect watermark position and text in PDF fileBug
VIEWERNET-786Out Of Memory Exception While Rendering Excel File into HTMLBug
VIEWERNET-596The bookmark range is invalid for .docxBug
VIEWERNET-747Text document format detected as UnknownBug
VIEWERNET-805GetPages() Method Throws “Parameter is not valid” ExceptionBug
VIEWERNET-807Output html contains garbled characters and few characters are mergedBug
VIEWERNET-820GetPages() throws exception for email attachmentsBug
VIEWERNET-821API throws exception in MonoBug
VIEWERNET-835User can’t catch GroupDocsExceptionBug
VIEWERNET-866Html watermark style block contains garbage characters.Bug
VIEWERNET-865Html watermark style block contains garbage characters.Bug
VIEWERNET-863Watermark is Rendered Incorrectly in Html RepresentationBug
VIEWERNET-838Wmf file dimmensions are different from dimmensions in the MS Paint.Bug
VIEWERNET-834TeX to Html conversion errorBug
VIEWERNET-829Incorrect Rendering of PDF Document into ImageBug
VIEWERNET-811The output pdf file contains black pages instead of content when converting djvu to pdf.Bug
VIEWERNET-810Slanting line does not appear in html renderingBug
VIEWERNET-794DefaultRegularFont setting doesn’t work properlyBug
VIEWERNET-566Specific pdf document can’t be saved as HTMLBug
VIEWERNET-496Exception when converting document to html after cleanupBug
VIEWERNET-437Some characters not displayed when render HTML or PNGBug
WEB-2372Different HTML generated for the same documentBug
WEB-1531Outlines are rendered incorrectly in HTMLBug
WEB-2320Some text extracted from document twiceBug
WEB-1709Text is shifted and duplicated in a PDF produced from VSDBug
WEB-1813Diagram file rendering regressionBug
WEB-2029Incorrect saving XLSX to HTMLBug
WEB-2289Incomplete converting XLSX to HTMLBug
WEB-2322Text coordinates are incorrect for a specific documentBug
WEB-2433Not all content of the Visio file is stored when converting to the PDFBug
WEB-1869Each page of a Word document is converted to HTML too longBug
WEB-2000Incorrect saving PDF to HTMLBug
WEB-2081There is no text in tables of a PDF after conversion to HTMLBug
WEB-2349Text selection is unstable in Firefox on the HTML engineBug
WEB-2070Convert .docx to .pdf wrong symbolBug
WEB-2448Missing character in resultant htmlBug
WEB-2425Incomprehensible characters when view pdfBug
WEB-2038Text issues when saving document containig XFA form to HTMLBug
VIEWERJAVA-853Supports the hyperlinks for the nested tabs for the .xls fileBug
VIEWERJAVA-924Cache is generated in the HTML mode independently of the useCache settingBug
VIEWERJAVA-962Thumbnails are not displaying for some filesBug
VIEWERJAVA-967PDF to PNG text issuesBug
VIEWERJAVA-988HTML to PNG bad conversionBug
VIEWERJAVA-1002Exception throws when try to rotate VTX fileBug
VIEWERJAVA-1015Pdf to Html text positioning issuesBug
VIEWERJAVA-1078preloadPagesCount() parameter doesn’t workBug
VIEWERJAVA-1079Quality parameter does not workBug
VIEWERJAVA-1108The background is missed for IE 11Bug
VIEWERJAVA-1186Exception when trying to get thumbnails from presentation fileBug
VIEWERJAVA-1203Issues in rendering PDF document to HTMLBug
VIEWERJAVA-1204Exception generated while calling handler.getDocumentInfo(uuid)Bug
VIEWERJAVA-1206Excel files are not rendering to Images and HTMLBug
VIEWERJAVA-1211Issue in generated PDF fileBug
VIEWERJAVA-1212Excel files are not rendering to HTML or ImagesBug
VIEWERJAVA-1216Performance issue with .pdf document that has a lot of images.Bug
VIEWERJAVA-1217Issue with showing Excel groupsBug
VIEWERJAVA-1220Invalid rendering of DWG file into Image or HTMLBug
VIEWERJAVA-1309Exception with chunk image data throws during retrieving all image pages including transformation without licenseBug

Public API and Backward Incompatible Changes

Custom fonts path

Set custom fonts directory path

    // Setup GroupDocs.Viewer config
    ViewerConfig config = new ViewerConfig();
    config.setStoragePath("C:\\storage");
    // Add custom fonts directories to FontDirectories list
    config.getFontDirectories().add("/usr/admin/Fonts");
    config.getFontDirectories().add("/home/admin/Fonts");
    // Init viewer handler with config
    ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
Working with email attachements

Get email attachment original file

    // Setup GroupDocs.Viewer config
    ViewerConfig config = new ViewerConfig();
    config.setStoragePath("C:\\storage");
    // Create image handler
    ViewerImageHandler handler = new ViewerImageHandler(config);
    EmailAttachment attachment = new EmailAttachment("document-with-attachments.msg", "attachment-image.png");
    // Get attachment original file
    FileContainer container = imageHandler.getFile(attachment);
    System.out.println("Attach name: " + attachment.getName() + ", size: " + attachment.getFileType());
    System.out.println("Attach stream lenght: " + fileContainer.getStream().available());

Get attachment document html representation

    // Setup GroupDocs.Viewer config
    ViewerConfig viewerConfig = new ViewerConfig();
    viewerConfig.setStoragePath("c:\\storage");
    viewerConfig.setUseCache(true);
    // Setup html conversion options
    HtmlOptions htmlOptions = new HtmlOptions();
    htmlOptions.setResourcesEmbedded(false);
    // Init viewer html handler
    ViewerHtmlHandler handler = new ViewerHtmlHandler(viewerConfig);
    DocumentInfoContainer info = handler.getDocumentInfo("document-with-attachments.msg");
    // Iterate over the attachments collection
    for (AttachmentBase attachment : info.getAttachments()) {
        System.out.println("Attach name: " + attachment.getName() + ", size: " + attachment.getFileType());
        // Get attachment document html representation
        List<PageHtml> pages = handler.getPages(attachment, htmlOptions);
        for (PageHtml page : pages) {
            System.out.println(" Page: " + page.getPageNumber() + ", size: " + page.getHtmlContent().length());
            for (HtmlResource htmlResource : page.getHtmlResources()) {
                InputStream resourceStream = handler.getResource(attachment, htmlResource);
                System.out.println(" Resource: " + htmlResource.getResourceName() + ", size: " + resourceStream.available());
            }
        }
    }

Get attachment document image representation

    // Setup GroupDocs.Viewer config
    ViewerConfig viewerConfig = new ViewerConfig();
    viewerConfig.setStoragePath("c:\\storage");
    viewerConfig.setUseCache(true);
    // Init viewer image handler
    ViewerImageHandler handler = new ViewerImageHandler(viewerConfig);
    DocumentInfoContainer info = handler.getDocumentInfo("document-with-attachments.msg");
    // Iterate over the attachments collection
    for (AttachmentBase attachment : info.getAttachments()) {
        System.out.println("Attach name: " + attachment.getName() + ", size: " + attachment.getFileType());
        // Get attachment document image representation
        List<PageImage> pages = handler.getPages(attachment, htmlOptions);
        for (PageImage page : pages) {
            System.out.println(" Page: " + page.getPageNumber() + ", size: " + page.getStream().available());
        }
    }

Get document information Get document information by guid

    // Setup GroupDocs.Viewer config
    ViewerConfig config = new ViewerConfig();
    config.setStoragePath("C:\\storage");
    // Create html handler
    ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
    String guid = "word.doc";
    // Get document information
    DocumentInfoOptions options = new DocumentInfoOptions();
    DocumentInfoContainer documentInfo = htmlHandler.getDocumentInfo(guid, options);
    System.out.println("DateCreated: " + documentInfo.getDateCreated());
    System.out.println("DocumentType: " + documentInfo.getDocumentType());
    System.out.println("DocumentTypeFormat: " + documentInfo.getDocumentTypeFormat());
    System.out.println("Extension: " + documentInfo.getExtension());
    System.out.println("FileType: " + documentInfo.getFileType());
    System.out.println("Guid: " + documentInfo.getGuid());
    System.out.println("LastModificationDate: " + documentInfo.getLastModificationDate());
    System.out.println("Name: " + documentInfo.getName());
    System.out.println("PageCount: " + documentInfo.getPages().size());
    System.out.println("Size: " + documentInfo.getSize());
    for (PageData pageData : documentInfo.getPages()) {
        System.out.println("Page number: " + pageData.getNumber());
        System.out.println("Page name: ", pageData.getName());
    }

Get document information by stream

    // Setup GroupDocs.Viewer config
    ViewerConfig config = new ViewerConfig();
    config.setStoragePath("C:\\storage");
    // Create html handler
    ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
    // Get document stream
    InputStream stream = getDocumentStream();
    // Get document information
    DocumentInfoOptions options = new DocumentInfoOptions();
    DocumentInfoContainer documentInfo = htmlHandler.getDocumentInfo(stream, options);
    System.out.println("DateCreated: " + documentInfo.getDateCreated());
    System.out.println("DocumentType: " + documentInfo.getDocumentType());
    System.out.println("DocumentTypeFormat: " + documentInfo.getDocumentTypeFormat());
    System.out.println("Extension: " + documentInfo.getExtension());
    System.out.println("FileType: " + documentInfo.getFileType());
    System.out.println("Guid: " + documentInfo.getGuid());
    System.out.println("LastModificationDate: " + documentInfo.getLastModificationDate());
    System.out.println("Name: " + documentInfo.getName());
    System.out.println("PageCount: " + documentInfo.getPages().size());
    System.out.println("Size: " + documentInfo.getSize());
    for (PageData pageData : documentInfo.getPages()) {
        System.out.println("Page number: " + pageData.getNumber());
        System.out.println("Page name: ", pageData.getName());
    }

Get document information by Uri

    // Setup GroupDocs.Viewer config
    ViewerConfig config = new ViewerConfig();
    config.setStoragePath("C:\\storage");
    // Create html handler
    ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
    URI uri = new URI("http://example.com/words.doc");
    // Get document information
    DocumentInfoOptions options = new DocumentInfoOptions();
    DocumentInfoContainer documentInfo = htmlHandler.getDocumentInfo(uri, options);
    System.out.println("DateCreated: " + documentInfo.getDateCreated());
    System.out.println("DocumentType: " + documentInfo.getDocumentType());
    System.out.println("DocumentTypeFormat: " + documentInfo.getDocumentTypeFormat());
    System.out.println("Extension: " + documentInfo.getExtension());
    System.out.println("FileType: " + documentInfo.getFileType());
    System.out.println("Guid: " + documentInfo.getGuid());
    System.out.println("LastModificationDate: " + documentInfo.getLastModificationDate());
    System.out.println("Name: " + documentInfo.getName());
    System.out.println("PageCount: " + documentInfo.getPages().size());
    System.out.println("Size: " + documentInfo.getSize());
    for (PageData pageData : documentInfo.getPages()) {
        System.out.println("Page number: " + pageData.getNumber());
        System.out.println("Page name: ", pageData.getName());
    }

Working with cache files How to clear all cache files.

    //Init viewer config
    ViewerConfig viewerConfig = new ViewerConfig();
    viewerConfig.setStoragePath("c:\\storage");
    // Init viewer image or html handler
    ViewerImageHandler viewerImageHandler = new ViewerImageHandler(viewerConfig);
    //Clear all cache files 
    viewerImageHandler.clearCache();

How to clear files from cache older than specified time interval.

    //Init viewer config
    ViewerConfig viewerConfig = new ViewerConfig();
    viewerConfig.setStoragePath("c:\\storage"); 
    // Init viewer image or html handler
    ViewerImageHandler viewerImageHandler = new ViewerImageHandler(viewerConfig);
    //Clear files from cache older than specified time interval
    viewerImageHandler.clearCache(24 * 60 * 60 * 1000);
  1. The PdfFileOptions addPrintAction property is depricated, please use PdfFileOptions Transformations property and Transformation.addPringAction enumeration.

  2. Implemented getPdfFile from stream or remote file public methods.
    Public api changes:

    1. ViewerHandler.getPdfFile(PdfFileOptions) marked as deprecated

    2. PdfFileOptions class all constructors except parameterles are marked as deprecated

    3. Added new ViewerHandler methods:

      • FileContainer getPdfFile(String guid);
      • FileContainer getPdfFile(String guid, PdfFileOptions pdfFileOptions);
      • FileContainer getPdfFile(InputStream fileStream);
      • FileContainer getPdfFile(InputStream fileStream, PdfFileOptions pdfFileOptions);
      • FileContainer getPdfFile(InputStream fileStream, String fileName);
      • FileContainer getPdfFile(InputStream fileStream, String fileName, PdfFileOptions pdfFileOptions);
      • FileContainer getPdfFile(URL uri);
      • FileContainer getPdfFile(URL uri, PdfFileOptions pdfFileOptions);
      • FileContainer getPdfFile(URL uri, WindowsAuthenticationCredential credential, PdfFileOptions pdfFileOptions);
  3. Implemented saving Cells document sheet to multiple pages in image mode.

    1. Public API changes: Option CellsOptions.setOnePagePerSheet() now supported by ImageHandler. 
  4. Implemented setting ‘FontName’ which allows users to specify font name for watermark text.
    Public API changes:

    1. Class: com.groupdocs.viewer.domain.Watermark
    2. Added field: getFontName() and setFontName()
    3. getPages method watermarking with font name
    4. getPdfFile method watermarking with font name
  5. Cleanup GetDocumentInfo method response.

    1. Class com.groupdocs.viewer.domain.containers.DocumentInfoContainer field setContentControls() marked as deprecated
    2. Class com.groupdocs.viewer.domain.ContentControl marked as deprecated
    3. Class com.groupdocs.viewer.domain.WordsFileData field setContentControls() marked as deprecated
  6. User can’t catch GroupDocsException

    1. New public class com.groupdocs.viewer.exception.GroupDocsViewerException
    2. All exceptions from com.groupdocs.viewer.exception package are derived classes of GroupDocsViewerException.
  7. How to specify resource prefix
    HtmlResourcePrefix setting is necessary when every resource name in html document should be prefixed with some string. This may be useful when resources for document are obtained via some REST API method. Please note that css files will also be processed - html resource prefix value will be added to font names in css file.

        HtmlOptions htmlOptions = new HtmlOptions();
        htmlOptions.setHtmlResourcePrefix("http://contoso.com/api/getResource?name=");
    

    If css files should not be processed then IgnoreResourcePrefixForCss setting should be set to true.

    HtmlOptions htmlOptions = new HtmlOptions();
    htmlOptions.setHtmlResourcePrefix("http://contoso.com/api/getResource?name=");
    htmlOptions.setIgnoreResourcePrefixForCss(true);
    
  8. How to set default font name

  9. Show hidden pages for Visio files

  10. How to specify internal hyperlink prefix for Excel files

  11. Mark CachedPageDescription redundant constructor as Obsolete
    1. Class com.groupdocs.viewer.domain.CachedPageDescription constructor public CachedPageDescription(String guid, CacheFileType cacheFileType) marked as deprecated

  12. Improve CAD files rendering 
    1. Class com.groupdocs.viewer.domain.DocumentTypeName constant public final String Autocad = “Autocad”; changed to public final String CAD = “CAD”

  13. Update public classes fields access modifiers.
    1. Class com.groupdocs.viewer.localization.LocalizedStringKeys new contant EXC_TMPL_CORRUPTED_OR_DAMAGED_FILE 2. Class com.groupdocs.viewer.localization.LocalizedStringKeys new contant EXC_TMPL_FILE_TYPE_NOT_SUPPORTED 3. Class com.groupdocs.viewer.localization.LocalizedStringKeys new contant EXC_TMPL_INVALID_PASSWORD 4. Class com.groupdocs.viewer.localization.LocalizedStringKeys new contant EXC_TMPL_PASSWORD_PROTECTED_FILE 5. Class com.groupdocs.viewer.localization.LocalizedStringKeys new contant EXC_TMPL_STORAGE_PATH_NOT_SPECIFIED 6. Class com.groupdocs.viewer.localization.LocalizedStringKeys new contant EXC_TMPL_CACHE_FILE_NOT_FOUND 7. Class com.groupdocs.viewer.localization.LocalizedStringKeys new contant EXC_TMPL_GUID_NOT_SPECIFIED 8. Class com.groupdocs.viewer.localization.LocalizedStringKeys new contant EXC_TMPL_TRANSFORMATION_FAILED_PAGE_NOT_EXIST

  14. Ability to set default font when rendering Diagram documents

  15. The ability to show and hide PDF layers

  16. Starting from version 3.7.0 GroupDocs.Viewer the rendering Pdf documents into html representation was improved. It is possible to work with layers in html representation of Pdf document (e.g. show\hide) with help of javascript. Each layer is separated into

    tag which has Html data tag “data-pdflayer” and its value contains layer name. For example Pdf document has layer with name “Backgroung” so output html will contain tag

  17. `<div data-pdflayer="Backgroung"> .... </div>`
    

    This layer can be easily accessed with javascript, see example how to access and hide layer with help of JQuery

    // get layer
    var layer = $("[data-pdflayer='Backgroung']");
    // hide layer
    layer.hide();
    // show layer
    layer.show();
    // get all layers
    var allLayers = $("[data-pdflayer]");
    // go throught all layers and print layer name
    allLayers.each(function(index) {
        console.log(index + ": " + $(this).data("pdflayer"));
    });