Easy printing commands.


Based on:
https://github.com/crabbly/Print.js


Description

The neoPrint plugin for VisualNEO Web offers easy-to-use commands for printing various types of content, including images, PDFs, and specific HTML container elements. This plugin is ideal for applications needing document output features, such as generating reports, printing forms, or offering downloadable content for users. Here’s an overview of its key functionalities and practical applications:

Printing PDF Files

The neoPrintPdf command is used to print PDF documents stored on the server or specified by URL.

    • Command: neoPrintPdf
    • Syntax: neoPrintPdf "theFile"
      • theFile: Path to the PDF file to be printed.

Example:

neoPrintPdf "docs/report.pdf"

This command prints the specified PDF file, ideal for applications that need to generate reports or downloadable documents​.

Printing Base64 Encoded PDFs and Images

The plugin also supports printing Base64-encoded files, allowing you to print PDFs or images directly from encoded data.

    • Commands:
      • neoPrintBase64Pdf: Prints a Base64-encoded PDF.
      • neoPrintBase64Image: Prints a Base64-encoded image.

Syntax for PDF:

neoPrintBase64Pdf "base64data"

This command enables you to print PDF data from a Base64 string, useful for dynamically generated PDFs.

Printing Images

With the neoPrintImage command, developers can specify an image file to print, making it easy to output image content directly from the application.

    • Command: neoPrintImage
    • Syntax: neoPrintImage "fileName"
      • fileName: Path to the image file.

Example:

neoPrintImage "images/chart.png"

Printing Container Content

For web apps needing to print content directly from specific HTML elements, the neoPrintContainer command allows targeting container objects for printing.

    • Command: neoPrintContainer
    • Syntax: neoPrintContainer "objId"
      • objId: The ID of the HTML container element containing the content.

Example:

neoPrintContainer "contentArea"

This prints the contents of a specified container, useful for printing forms, text content, or user inputs directly from the app interface.

Practical Applications

The neoPrint plugin is useful for:

    • Report Generation: Allowing users to print PDFs or specific content sections.
    • Form Printing: Enabling users to print completed forms or data entries.
    • Dynamic Content Printing: Providing printable versions of charts, images, or interactive content created in the application.

The neoPrint plugin simplifies adding print functionality to VisualNEO Web applications, enhancing document output options for users​.

 

neoPrintPdf

Purpose:

Print a PDF document

Category:

neoPrint

Syntax:

neoPrintPdf "theFile"

 

theFile

PDF document path

 

neoPrintBase64Pdf

Purpose:

Print a Base64 encoded PDF document

Category:

neoPrint

Syntax:

neoPrintBase64Pdf "base64data"

 

base64data

Base64 PDF data

 

neoPrintImage

Purpose:

Print an image

Category:

neoPrint

Syntax:

neoPrintImage "fileName"

 

fileName

Image file path

 

neoPrintBase64Image

Purpose:

Print aBase64 encoded image

Category:

neoPrint

Syntax:

neoPrintBase64Image "base64data"

 

base64data

Base64 image data

 

neoPrintContainer

Purpose:

Print Container text content

Category:

neoPrint

Syntax:

neoPrintContainer "objId"

 

objId

Select a Container object

Created with the Personal Edition of HelpNDoc: Easily share your documentation with the world through a beautiful website