HexCoda PDF Viewer Pro Documentation

Documentation version: HexCoda PDF Viewer Pro 1.0.0

HexCoda PDF Viewer Pro lets you embed responsive PDF readers directly inside WordPress posts and pages. The plugin includes page navigation, zoom controls, fullscreen reading, mobile layouts, image watermarks, configurable document actions, and practical copy-protection tools.

The viewer uses a locally bundled PDF.js library. Documents remain on your WordPress website and are not sent to Google Docs or another external PDF-rendering service.

The same viewer works with Gutenberg, the Classic Editor, Elementor Free, Flatsome UX Builder, and WordPress shortcodes.

1. Plugin Overview

HexCoda PDF Viewer Pro replaces basic PDF download links and browser embeds with a responsive document-reading interface.

The plugin supports:

  • Single Page and Continuous Scroll reading modes
  • Previous and Next page navigation
  • Editable page-number controls
  • Zoom In, Zoom Out, Fit Width, and Fit Page
  • Fullscreen reading
  • Optional Print and Download buttons
  • Responsive desktop, tablet, and mobile sizing
  • Mobile compact toolbar and document launcher
  • Image watermarks
  • Viewer-level Copy Protection
  • Per-viewer setting overrides
  • Internal and external PDF links
  • Local PDF rendering without an external viewer service

Common uses include:

  • Business reports and brochures
  • Product sheets and price lists
  • Course notes and educational material
  • Magazines and digital publications
  • Policies and annual reports
  • Menus and event programs
  • Member-only or paid documents

Important: HexCoda PDF Viewer Pro is a PDF viewer, not a PDF editor. It does not modify, repair, convert, or restructure the original PDF file.

2. Requirements

Before installing HexCoda PDF Viewer Pro, confirm that your website meets these requirements:

  • WordPress 6.4 or newer
  • PHP 7.4 or newer
  • JavaScript enabled in the visitor’s browser
  • A modern desktop or mobile browser
  • PDF files uploaded to the WordPress Media Library

The plugin accepts validated PDF attachments stored locally in the WordPress Media Library.

You cannot replace the Media Library attachment with:

  • A remote PDF URL
  • A filesystem path
  • A PDF filename without an attachment ID

Before publishing a document, open the original PDF locally and verify that:

  • Every page renders correctly
  • Fonts display correctly
  • Internal and external links work
  • The Media Library title clearly describes the document
  • The source PDF meets your accessibility requirements

3. Installation

Install the plugin ZIP

  1. Log in to your WordPress administration area.
  2. Go to Plugins > Add New Plugin.
  3. Choose Upload Plugin.
  4. Select the HexCoda PDF Viewer Pro installation ZIP.
  5. Choose Install Now.
  6. After installation finishes, choose Activate Plugin.

After activation, WordPress adds the PDF Viewer administration area.

Before publishing your first document, open:

PDF Viewer > Settings

Review the default reading mode, toolbar controls, mobile behavior, appearance, watermark, protection, and viewer sizing options.

Upload a PDF

You can upload a document through:

Media > Add New

You may also upload or select a PDF while adding a HexCoda viewer in Gutenberg, Elementor, Flatsome UX Builder, or the Classic Editor.

4. Create Your First PDF Viewer

The Gutenberg block provides the fastest general workflow.

  1. Open an existing page or create a new page.
  2. Add the HexCoda PDF Viewer block.
  3. Choose Select or Upload PDF.
  4. Select one PDF from the WordPress Media Library.
  5. Confirm the displayed document title or filename.
  6. Publish or update the page.
  7. Test the public page on desktop and mobile.

The editor displays a lightweight placeholder and does not load the complete PDF.js viewer.

Replace or remove a PDF

Use Replace to select a different Media Library attachment.

Use Remove to clear the selected document from the viewer.

Neither action deletes the original PDF from the Media Library.

Add multiple PDF viewers

Add a separate block, widget, UX Builder element, or shortcode for each document.

Every viewer maintains its own:

  • Current page
  • Zoom level
  • Scroll position
  • Fullscreen state

5. Global Settings

Open PDF Viewer > Settings to configure the defaults used by all PDF viewers.

The settings workspace includes:

  • General
  • Toolbar
  • Protection
  • Mobile
  • Appearance
  • Watermark
  • Viewer Sizing

A viewer inherits the global configuration unless you enable customization for that viewer.

General settings

  • Reading mode: Choose Single Page or Continuous Scroll.
  • Starting page: Choose the page displayed when the viewer loads.
  • Lazy loading: Delay viewer initialization until the document approaches the visible browser area.
  • Show title: Display or hide the Media Library document title.

Toolbar settings

You can configure:

  • Toolbar position above or below the document
  • Always visible or auto-hide behavior
  • Previous and Next navigation
  • Current page and total page count
  • Zoom controls and editable percentage
  • Fit Width
  • Fit Page
  • Print
  • Download
  • Fullscreen
  • Original PDF fallback link

The fallback link can be:

  • Always visible
  • Visible only after a viewer error
  • Hidden

Toolbar auto-hide remains disabled on touch devices so controls stay accessible.

Mobile settings

The mobile options include:

  • Compact toolbar
  • Mobile document launcher
  • Launcher breakpoint from 320 to 1200 pixels
  • Optional launcher title
  • Optional document page count

The mobile launcher can replace the inline reader with a focused document-opening panel on narrow screens.

Appearance settings

You can choose a Light or Dark viewer theme and configure:

  • Viewer background
  • Toolbar background
  • Toolbar text and icon color
  • Accent color
  • Border color
  • Border radius

The settings page includes a preview. You should still inspect the saved viewer on a public page because your WordPress theme may affect the final appearance.

Viewer sizing

HexCoda PDF Viewer Pro includes four sizing modes:

  • Automatic A4: Uses a portrait A4 ratio with browser viewport limits.
  • Browser Viewport: Uses configured desktop, tablet, and mobile viewport-height values.
  • Fixed Height: Uses one pixel height across all devices.
  • Custom Responsive: Uses separate desktop, tablet, and mobile pixel heights.

Automatic A4 provides a practical starting point for most portrait documents.

Use Fixed Height when you need a strict layout. Use Custom Responsive when your theme requires different heights for desktop, tablet, and mobile.

Save or reset settings

Choose Save Changes to store the configuration.

Choose Reset to Defaults to restore the full HexCoda default settings after confirmation.

Resetting the settings does not delete PDFs, posts, pages, shortcodes, blocks, or viewer elements.

6. Gutenberg Block

Insert the HexCoda PDF Viewer block and choose one PDF from the WordPress Media Library.

The stored Media Library attachment ID controls the viewer. The displayed filename and URL serve only as editor information.

Customize one Gutenberg viewer

Open the block settings and enable:

Customize this viewer

You can override selected settings such as:

  • Reading mode
  • Copy Protection
  • Print
  • Download
  • Watermark
  • Fallback-link behavior
  • Viewer sizing

Per-viewer changes do not modify the global settings.

Copy Protection and visual watermarks apply to the public viewer, not the lightweight Gutenberg editor placeholder.

7. Classic Editor

To insert a viewer through the Classic Editor:

  1. Open a post or page.
  2. Place the cursor where the viewer should appear.
  3. Choose Add PDF Viewer beside the regular Add Media button.
  4. Select or upload one PDF.
  5. Save or publish the page.

The plugin inserts a shortcode similar to:

The regular WordPress Add Media button may insert only a file link. Use Add PDF Viewer to insert the HexCoda reading interface.

8. Elementor Free

HexCoda PDF Viewer Pro works with Elementor Free. Elementor Pro is not required.

  1. Edit a page with Elementor.
  2. Find the HexCoda category in the widget panel.
  3. Drag the PDF Viewer widget into the page.
  4. Select one PDF from the Media Library.
  5. Optionally enable viewer customization.
  6. Update or publish the page.

The Elementor widget uses the same PDF validation and rendering system as Gutenberg and shortcodes.

Invalid or non-PDF attachments are rejected.

9. Flatsome UX Builder

To insert a PDF viewer using Flatsome UX Builder:

  1. Edit the page with UX Builder.
  2. Choose Add Element.
  3. Open the HexCoda category.
  4. Select PDF Viewer.
  5. Use PDF document to select or upload one PDF.
  6. Optionally customize the viewer settings.
  7. Apply the element settings and save the page.

The standard HexCoda viewer appears inside the UX Builder preview.

Saved page content remains renderable if Flatsome is later deactivated, provided the HexCoda PDF Viewer Pro plugin remains active.

10. Shortcode Reference

Basic shortcode

Replace 123 with the positive attachment ID of a PDF stored in the WordPress Media Library.

Do not use:

  • A PDF URL
  • A filesystem path
  • A filename

Boolean attributes

Boolean attributes accept on or off.

  • protection controls Copy Protection.
  • print controls the Print button.
  • download controls the Download button.
  • watermark controls the configured image watermark.
  • zoom-controls controls zoom buttons and the percentage field.
  • navigation controls page navigation.
  • fit-width controls Fit Width.
  • fit-page controls Fit Page.
  • fullscreen controls fullscreen access.

Other shortcode attributes

  • reading-mode="single-page"
  • reading-mode="continuous-scroll"
  • sizing-mode="auto_a4"
  • sizing-mode="fixed"
  • height="840"
  • fallback-link="always"
  • fallback-link="error"
  • fallback-link="hidden"

The fixed height accepts values from 320 to 2000 pixels.

Shortcode examples

Protected and watermarked document

Downloadable catalogue

Minimal reader

Fixed-height viewer

Copy Protection priority: When Copy Protection is enabled, Print, Download, and the original-PDF fallback link remain disabled even when another shortcode option attempts to enable them.

11. Reading Modes and Navigation

Single Page mode

Single Page mode renders one requested page at a time.

Visitors can use:

  • Previous
  • Next
  • The editable page-number field

Invalid page values are restored or limited to the valid document page range.

Continuous Scroll mode

Continuous Scroll creates a vertical stream of document pages.

The viewer progressively renders visible and nearby pages. It releases distant page canvases when appropriate to reduce memory use.

The current-page field follows the page that occupies the active viewing area.

Zoom controls

Visitors can:

  • Zoom In
  • Zoom Out
  • Enter a percentage between 25% and 400%
  • Use Fit Width
  • Use Fit Page

The current page and zoom level remain stable when the browser resizes or the viewer enters fullscreen.

PDF links

The viewer supports:

  • External website links
  • Email links
  • Internal PDF page destinations
  • PDF named destinations

Unsafe protocols and PDF JavaScript actions are rejected.

If a link was not encoded correctly in the original PDF, the viewer may not be able to restore it. Test important links before publishing.

12. Mobile and Fullscreen

The viewer recalculates its dimensions when:

  • The viewer container changes
  • The browser viewport changes
  • The device orientation changes

The compact toolbar and optional mobile launcher keep the document usable on narrow screens.

Fullscreen reading

Where supported, the viewer uses the browser’s native fullscreen mode.

When native fullscreen is unavailable, the plugin opens an accessible modal-style fallback.

Visitors can leave fullscreen by:

  • Pressing Escape
  • Choosing Exit Fullscreen

Keyboard focus returns to the previous control after fullscreen closes.

Recommended mobile tests

Before publishing, test:

  • A real phone, not only a desktop responsive preview
  • Portrait orientation
  • Landscape orientation
  • Compatibility with your theme’s sticky header
  • A long Continuous Scroll document
  • Fullscreen entry and exit
  • Internal and external links
  • Page navigation and zoom controls

13. Image Watermarks

The watermark feature places a visual image over every rendered PDF page.

Supported image formats include:

  • PNG
  • Transparent PNG
  • JPG
  • JPEG

The watermark image must be selected from the WordPress Media Library.

Configure a watermark

  1. Go to PDF Viewer > Settings > Watermark.
  2. Enable Image Watermark.
  3. Select a custom image or the bundled sample watermark.
  4. Choose one of the available page positions.
  5. Adjust size, opacity, rotation, and offsets.
  6. Review the preview.
  7. Save the settings and inspect the public viewer.

Watermark controls

  • Position: Nine page-relative positions
  • Size: 5% to 80% of the PDF page width
  • Opacity: 5% to 100%
  • Rotation: -180° to 180°
  • Horizontal offset: -50% to 50%
  • Vertical offset: -50% to 50%

The nine available positions are:

  • Top-left
  • Top-center
  • Top-right
  • Middle-left
  • Center
  • Middle-right
  • Bottom-left
  • Bottom-center
  • Bottom-right

Watermark limitation: The watermark is a visual viewer overlay. It does not alter the source PDF and does not appear inside the original downloaded file or native browser print output.

14. Copy Protection

Copy Protection provides viewer-level deterrence for documents where ordinary copying, downloading, or printing should be discouraged.

What Copy Protection changes

When enabled, Copy Protection:

  • Removes the Print control
  • Removes the Download control
  • Removes the original-PDF fallback link
  • Blocks ordinary text selection inside the viewer
  • Blocks standard copy actions
  • Blocks dragging inside the viewer
  • Blocks the normal right-click menu inside the viewer
  • Uses signed document-delivery URLs
  • Omits the original PDF URL from the initial page HTML
  • Applies private-cache and no-index response headers
  • Keeps legitimate links inside the PDF functional

What Copy Protection cannot do

Copy Protection does not:

  • Encrypt the original Media Library file
  • Create DRM-protected content
  • Prevent screenshots
  • Prevent photography of the screen
  • Guarantee that an advanced user cannot recover delivered document data
  • Modify or permanently watermark the source PDF

Copy Protection should be described as practical deterrence, not absolute security.

A browser must receive document data to display the PDF. A determined technical user may still extract or reconstruct that content.

Protection and caching

Protected delivery uses signed, time-limited URLs and private-cache rules.

If a cache, security, or optimization plugin blocks protected documents, exclude the protected delivery route from full-page caching and test the document again.

15. Per-Viewer Customization

Per-viewer customization allows public, downloadable, protected, and watermarked documents to coexist on the same website.

The final viewer configuration follows this order:

  1. Global settings define the site-wide defaults.
  2. Per-viewer overrides modify only the selected options.
  3. Copy Protection enforces the final protection restrictions.

When Copy Protection is enabled, it always forces:

  • Print off
  • Download off
  • Fallback link hidden

Suggested configurations

Public brochure

  • Continuous Scroll
  • Print on
  • Download on
  • Fallback link always visible

Training manual

  • Single Page
  • Watermark on
  • Fullscreen on
  • Download according to your content policy

Member document

  • Copy Protection on
  • Watermark on
  • Fallback link hidden

Minimal portfolio

  • Navigation on
  • Fullscreen on
  • Print and Download off

Long annual report

  • Continuous Scroll
  • Lazy loading on
  • Automatic A4 sizing

16. Performance and Accessibility

PDF performance depends on:

  • Page count
  • Image resolution
  • Embedded fonts
  • File compression
  • Hosting performance
  • The visitor’s device

HexCoda reduces unnecessary processing through:

  • Conditional asset loading
  • Lazy document initialization
  • A bounded rendering queue
  • Off-screen canvas release

Improve PDF performance

  • Optimize oversized images before exporting the PDF.
  • Remove unused embedded fonts.
  • Remove unnecessary PDF attachments.
  • Use web-appropriate image resolution.
  • Test large files on a mid-range mobile device.
  • Use reliable hosting.
  • Avoid placing many large viewers above the fold.

Accessibility features

The viewer includes:

  • Semantic toolbar controls
  • Accessible button names
  • Keyboard-operable navigation
  • Keyboard-operable zoom controls
  • Keyboard-operable PDF links
  • Visible focus states
  • Polite viewer status announcements
  • Screen-reader descriptions for page and zoom controls
  • Watermarks excluded from pointer interaction and the reading order
  • Focus restoration after fallback fullscreen closes

Accessibility limitation: The viewer cannot repair an untagged or poorly structured source PDF.

For essential information, provide an accessible HTML alternative when the original PDF does not meet your audience’s needs.

17. Troubleshooting

The viewer displays an error

Confirm that:

  • The Media Library attachment still exists
  • The file is a genuine PDF
  • The local PDF file remains readable
  • The attachment was not replaced with a non-PDF file

Only a PDF link appears

Use one of the HexCoda integrations:

  • Gutenberg block
  • Add PDF Viewer button
  • Elementor widget
  • Flatsome UX Builder element
  • HexCoda shortcode

The standard WordPress File block or Add Media option may create only a download link.

A remote PDF will not load

Upload the document to the local WordPress Media Library.

Arbitrary remote PDF URLs are intentionally unsupported.

Print or Download is missing

Check:

  • The global toolbar settings
  • The per-viewer override
  • Copy Protection

Copy Protection always disables Print and Download.

The fallback link is missing

Check the configured fallback-link policy and Copy Protection.

Copy Protection always forces the fallback link to remain hidden.

The watermark is missing

Confirm that:

  • Watermark is enabled globally or for the selected viewer
  • The selected image uses PNG, JPG, or JPEG format
  • The settings were saved
  • Your cache was cleared

The viewer is too tall or too short

Change the global Viewer Sizing mode or configure a fixed per-viewer height between 320 and 2000 pixels.

The toolbar disappears

Check whether toolbar auto-hide is enabled.

Move the pointer toward the configured toolbar edge or move keyboard focus into the toolbar.

A PDF link does not work

Confirm that the link was encoded correctly in the source PDF and uses a supported destination or safe protocol.

A protected document fails to load

Temporarily exclude the protected delivery route from caching or security optimization.

Inspect the PHP and web-server logs for blocked requests or errors.

The mobile layout feels cramped

Enable the compact toolbar or mobile launcher and adjust the launcher breakpoint.

Changes do not appear

  • Save the viewer and page.
  • Clear the page cache.
  • Clear the object cache.
  • Clear the CDN cache.
  • Clear the browser cache.
  • Test the page in a private browser window.

Safe diagnostic sequence

  1. Update the page and clear all relevant caches.
  2. Confirm that the PDF opens directly from the Media Library.
  3. Test the viewer with global defaults and no local customization.
  4. Temporarily disable optimization for the affected page.
  5. Test with a default WordPress theme on a staging website.
  6. Record your WordPress, PHP, browser, theme, and plugin versions.

Use a staging website when disabling plugins, switching themes, or changing caching and security rules.

18. Maintenance, Privacy, and Licensing

Updates and backups

Before installing a plugin update:

  • Create a complete WordPress backup.
  • Confirm that the backup can be restored.
  • Test the update on staging when the viewer is business-critical.
  • Test at least one public viewer after updating.
  • Test at least one protected viewer.
  • Test at least one viewer on mobile.

Uninstall behavior

Removing the plugin disables HexCoda viewer output.

Your Media Library PDFs, posts, and pages remain stored in WordPress.

Blocks, widgets, UX Builder elements, and shortcodes require the plugin to remain active to display the complete viewer.

Privacy

HexCoda PDF Viewer Pro:

  • Does not require an external document-viewing service
  • Does not send viewer telemetry to HexCoda
  • Does not require a HexCoda tracking cookie

Your hosting provider, theme, CDN, analytics platform, and other WordPress plugins may have separate privacy behavior.

License

HexCoda PDF Viewer Pro includes a perpetual license.

A perpetual license allows you to continue using the licensed product version without an ongoing subscription.

The following depend on the purchase terms supplied with your license:

  • Number of licensed production websites
  • Staging or development allowances
  • Update access
  • Support period
  • Refund conditions

Keep your order confirmation, license details, and original plugin ZIP in a secure location.

19. Quick Reference

Default configuration

  • Reading: Single Page, page 1, lazy loading on, title visible
  • Toolbar: Top, always visible, navigation, zoom, fit, Print, Download, and fullscreen enabled
  • Fallback link: Always visible
  • Mobile: Compact toolbar on, launcher off, 600-pixel breakpoint
  • Appearance: Light theme, dark toolbar, blue accent, 8-pixel radius
  • Sizing: Automatic portrait A4 with viewport limits
  • Watermark: Off
  • Copy Protection: Off

Essential shortcode patterns

Pre-publish checklist

  • The PDF opens and renders every page.
  • The Media Library title clearly identifies the document.
  • Navigation, zoom, and fullscreen work.
  • Important internal and external links work.
  • Print, Download, and fallback-link behavior match your document policy.
  • You understand the limitations of Copy Protection.
  • The watermark remains visible without covering important content.
  • The viewer has been tested on desktop, tablet, and phone.
  • The source PDF and surrounding page meet your accessibility requirements.
  • The page has been retested after clearing caches.

20. Support

When contacting HexCoda support, include:

  • Your order information
  • HexCoda PDF Viewer Pro version
  • WordPress version
  • PHP version
  • WooCommerce version, where applicable
  • The editor or page builder being used
  • Your browser and operating system
  • The exact steps required to reproduce the issue
  • Screenshots that do not expose private information
  • Relevant error logs, where available

For support, contact:

HexCoda
Email: info@hexcoda.com
Website: HexCoda.com

Do not publish suspected security vulnerabilities publicly before HexCoda has had a reasonable opportunity to investigate them.

Send a concise reproduction, affected version information, and expected impact through the official HexCoda support channel.