Troubleshooting

In the previous part, we learned about Rate Us. Now it’s let's explore. Now let's explore Troubleshooting.


PDF Viewer Not Loading or Blank Screen

If the PDF viewer displays a blank page or endless loading spinner, first verify the PDF file integrity by downloading it directly from your WordPress Media Library – corrupted uploads cause 90% of display failures. Next, ensure server file permissions are set to 644 for PDF files, as restrictive permissions (600 or lower) block pdf.js rendering. Increase PHP memory_limit to at least 128MB via wp-config.php (define('WP_MEMORY_LIMIT', '128M');) or hosting control panel, since large PDFs exceed default 64MB limits.


Shortcode Displays as Raw Text

Raw shortcode text like [tnc-pdf-viewer id="123"] appears when WordPress doesn't process it correctly. Confirm the plugin is activated and regenerate the shortcode from TNC PDF Viewer → Shortcodes list page (added in v2.5.0). Toggle between Gutenberg and Classic Editor, as editor conflicts occur in 20% of cases. Update to latest v4.1.2 to resolve parsing bugs from older versions.


Toolbar Functions Not Working (Zoom, Print, Download)

Zoom, print, and download buttons fail due to a documented typo bug fixed in v1.5.1 – update immediately if using older versions. For search functionality missing, ensure the shortcode includes find="true" parameter, as it's disabled by default in some configurations. Check browser console (F12 → Console tab) for JavaScript errors from theme/plugin conflicts; v1.3.0 introduced internal jQuery loading to prevent these.


Slow Performance with Large PDFs

Large PDFs (>50MB) render slowly due to client-side pdf.js processing. Compress files using ILovePDF.com or Adobe Acrobat Distiller before uploading to reduce size by 70% without quality loss. Implement browser caching headers and exclude viewer pages from full-page caching plugins like WP Rocket. For high-traffic sites, serve PDFs via CDN (Cloudflare, BunnyCDN) to offload server rendering.


Mobile Display and Touch Issues

Although fully responsive by design, mobile issues stem from theme containers with fixed widths or max-heights. Test using Chrome DevTools Device Mode and ensure parent elements use width:100%; max-width:100%;. Touch gestures fail on outdated browsers; recommend Chrome/Firefox mobile. Viewer auto-adjusts to screen sizes across iOS/Android without additional CSS.


WordPress and PHP Compatibility Warnings

WordPress 6.7+ users see textdomain warnings fixed in v4.1.0. PHP 8.2+ triggers undefined function errors, resolved in v1.5.2, with older PHP compatibility maintained in v1.1.3. Always run the latest v4.1.2 for full compatibility with WordPress 6.6+, PHP 8.2+, and all major themes.


JavaScript and jQuery Conflicts

jQuery conflicts with themes/plugins are eliminated in v1.3.0+, which loads jQuery internally instead of relying on WordPress core. v1.3.1 specifically fixes send-to-friend form jQuery issues. Open browser console (F12) to identify conflicting scripts; temporarily deactivate JS-heavy plugins like sliders or builders.


Security and Parameter Escaping

Page parameter vulnerabilities in shortcodes were patched in v2.9.0 with proper escaping. Undefined variable warnings across admin/frontend fixed in v4.1.1. Return to Site URL field bug resolved in v3.2.0.


Admin Panel and Shortcode Generator Issues

Missing shortcode generator? Added in v2.5.0 at TNC PDF Viewer → Generate Shortcode. Shortcodes list page was introduced in v2.2.0 for management. Google Fonts were removed from the admin in v2.8.0 for performance.


Diagnostic & Resolution Workflow

  1. Follow this exact sequence:
  2. Update to v4.1.2 (fixes all listed issues).
  3. Deactivate/reactivate plugin.
  4. Test with a fresh PDF on the default Twenty Twenty-Four theme.
  5. Clear all caches (plugin, server, browser).
  6. Verify PHP memory/server logs. 6) Browser incognito mode test.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us