IBM TechXchange Group

 View Only
  • 1.  IBM Content Navigator document viewing using bookmark.jsp

    Posted Tue January 02, 2024 01:52 PM

    I'm trying to use bookmark.jsp to display 3 documents (mime tyoe = pdf).  I'd like to pass the DocID's as URL arguments.  So far I've only been able to make it work with a single document.  Are multiple documents supported out of the box, or is custom development needed?



    ------------------------------
    Gary Busansky
    VP
    RGB Projects Inc
    CA
    ------------------------------


  • 2.  RE: IBM Content Navigator document viewing using bookmark.jsp

    IBM Champion
    Posted Tue March 12, 2024 06:52 PM
      |   view attached

    "IBM Content Navigator with Multi-Document Display: A Guide to Using bookmark.jsp for Multiple PDFs" with a focus on IBM Content Navigator (ICN) 2.0.3, let's incorporate specific elements from ICN documentation and best practices, emphasizing custom application development and integration within the ICN framework.



    ------------------------------
    Raydo Matthee
    CEO | IBM Certified Facilitator
    Skunkworks (Pty) Ltd
    Johannesburg
    +27833807950
    ------------------------------



  • 3.  RE: IBM Content Navigator document viewing using bookmark.jsp

    IBM Champion
    Posted Mon May 06, 2024 10:13 AM

    Tutorial: Integrating Multi-Document Display in IBM Content Navigator 2.0.3

    "IBM Content Navigator with Multi-Document Display: A Guide to Using bookmark.jsp for Multiple PDFs" with a focus on IBM Content Navigator (ICN) 2.0.3, let's incorporate specific elements from ICN documentation and best practices, emphasizing custom application development and integration within the ICN framework.

    Introduction

    IBM Content Navigator 2.0.3 provides a robust platform for accessing, managing, and integrating content from various content servers. This enhanced guide will focus on leveraging ICN's extensible architecture to implement a multi-document display feature using `bookmark.jsp`, enhancing the user's ability to view multiple PDF documents simultaneously.
     

    Prerequisites

    • Access to IBM Content Navigator 2.0.3 environment.
    • Basic understanding of ICN's plugin architecture and development environment.
    • JDK, IDE (Eclipse, IntelliJ IDEA, or NetBeans), and Apache Tomcat for local development and testing.
     

    Step 1: Understanding ICN's Customization Capabilities

    Familiarize yourself with ICN's customization options, focusing on creating plugins and custom actions. ICN's powerful API toolkit allows for extensive extensions and custom web application development.
     

    Step 2: Setting Up Your Development Environment.

    Set up your local development environment to mirror the ICN setup, ensuring you have the necessary tools and access to the ICN plugin development kit.
     

    Step 3: Creating or modifying `bookmark.jsp`.

    1. Locate or create `bookmark.jsp`:
      • Within your ICN plugin project, find or create a new JSP file named `bookmark.jsp`. This file will serve as the interface for displaying multiple PDF documents.
    2. Implementing Document Handling Logic:
      • Use ICN's APIs to interact with content repositories.
      • Parse Document IDs from URL arguments and resolve them to PDF file paths or URLs.
      • Ensure to handle various content sources supported by ICN, such as IBM Content Manager and FileNet P8 repositories.
     

    Step 4: Enhancing `bookmark.jsp` for Multi-Document Display.

    Embed sophisticated code to bookmark.jsp, ensuring it aligns with ICN standards and practices. Here's an enhanced code snippet to guide you:
     
    <%@ page import="java.util.*,com.ibm.ecm.extension.*,com.ibm.ecm.service.*" %>
    <!DOCTYPE html>
    <html>
    <head>
        <title>Enhanced ICN Multi-Document Viewer</title>
        <style>
            /* Add your CSS styling here to match ICN's look and feel */
        </style>
    </head>
    <body>
        <h2>PDF Document Viewer</h2>
        <% 
        String docIDs = request.getParameter("docIDs");
        if(docIDs != null && !docIDs.isEmpty()) {
            String[] ids = docIDs.split(",");
            for(String id : ids) {
                String pdfURL = fetchDocumentURL(id.trim()); // Implement this method to utilize ICN APIs
        %>
        <div class="pdf-viewer">
            <h3>Document ID: <%= id %></h3>
            <object data="<%= pdfURL %>" type="application/pdf" width="600" height="500">
                <p>Your browser does not support PDFs. <a href="<%= pdfURL %>">Download the PDF</a>.</p>
            </object>
        </div>
        <%
            }
        } else {
        %>
        <p>No documents selected for viewing.</p>
        <%
        }
        %>
    </body>
    </html>
    
    Replace `fetchDocumentURL` with your method that leverages ICN's API to obtain the PDF URL based on the document ID. Ensure your method handles authentication and authorization as per ICN's security model.

    Step 5: Testing and Deployment.

    • Test your `bookmark.jsp` within a development instance of ICN, ensuring that multiple PDFs are displayed as expected.
    • Deploy your custom plugin to the ICN environment following best practices for ICN plugin deployment.
     

    Best Practices and Considerations.

    • Security: Ensure all inputs are sanitized to prevent security vulnerabilities.
    • Performance: Test the performance impact of displaying multiple PDFs, especially in production environments.
    • User Experience: Aim for a seamless integration with ICN, ensuring the multi-document display is intuitive and enhances the user workflow.
     

    By following this guide, you can enhance the IBM Content Navigator 2.0.3 environment with a multi-document display feature, improving document accessibility and user productivity within your organization.




    ------------------------------
    Raydo Matthee
    CEO | IBM Certified Facilitator
    Skunkworks (Pty) Ltd
    Johannesburg
    +27833807950
    ------------------------------