Documents for PDF .NET Edition
GrapeCity Documents PDF Viewer / View PDF / Features / View PDF Elements
In This Topic
    View PDF Elements
    In This Topic

    GcDocs PDF Viewer supports viewing different PDF elements such as layers, structured content or XFA content.

    View Layers

    PDF documents can contain content in different layers (also known as optional content) and a particular layer can be made visible or invisible as required. GcPdf allows you to work with layers and set their properties, refer Layers for more information.

    In GcDocs PDF Viewer, you can examine these layers and show or hide content associated with each layer by using the 'Layers' panel, provided in its sidebar. The viewer also saves visibility state of the layers on pressing the 'Save' button.

    Enable Layers Panel in GcDocs PDF Viewer

    The Layers panel can be displayed by enabling the addLayersPanel in the viewer using below code:

    Copy Code

    The below GIF shows a PDF document containing 'English' and 'Russian' language layers and how they can be made visible or invisible using the GcDocs PDF Viewer Layers panel.

    View Structured Content in Tagged PDF

    GcPdf allows you to create or modify tagged PDF documents. Refer Tagged PDF to know more. You can use the Structure Tree panel of GcDocs PDF Viewer to load a tagged PDF and navigate between the available structured elements such as heading, table, paragraph etc.

    The below image shows the Structure Tree panel when a tagged PDF is opened in GcDocs PDF Viewer. The number in the page header indicates the total number of items in the structure tree on that page (excluding the root element).

    The below code example shows how to enable the Structure Tree panel by using the addStructureTreePanel method.

    Copy Code
    var viewer = new GcPdfViewer(selector);       

    View XFA Content

    XFA stands for XML Forms Architecture and can be used to enhance the processing of web forms. Refer XFA to know more.

    GcDocs PDF Viewer supports displaying PDF documents containing XFA content, by default. It also allows you to select and copy the content from XFA forms. Moreover, GcDocs PDF Viewer lets you use links, reset, submit and print the XFA form if these JavaScript actions are included in the form. To disable the rendering of XFA content in PDF, you can use the enableXfa option as shown in the below code example:

    Copy Code
    // Turn off XFA forms rendering.
    var viewer = new GcPdfViewer(selector, { enableXfa: false });