@consumidor-positivo/ts-utils - v1.16.0
    Preparing search index...

    Function openBase64PdfInTab

    • Opens a PDF in a new tab using a base64-encoded string.

      Parameters

      • pdf: string

        The base64-encoded string representing the PDF content.

      • OptionaltimeRevokeUrl: number = 25000

        The time in milliseconds to revoke the PDF URL (default is 25000ms).

      Returns void

      If the pdf parameter is empty or not a valid string.

      const base64PDF = 'JVBERi0xLjcK...'; // Base64 string of the PDF
      openBase64PdfInTab(base64PDF);