PDF Editing Issues

Fix PDF QR Code Fields Not Updating with JavaScript in ServiceNow

Muhammad TalhaMuhammad Talha Nov 3, 2026 869 views

Question details

The user needs to resolve an issue where PDF QR code or barcode fields populated dynamically via JavaScript do not render correctly.

How to Fix PDF QR Code Fields Not Updating with JavaScript in ServiceNow
Product
ServiceNow PDF Generation
Device & OS
not provided
Scenario
Dynamically assigning values to PDF form fields using JavaScript within a ServiceNow workflow.
Observed behavior
Assigning a value to a QR code or barcode field results in the visible code being replaced with plain text, or the old QR code remains unchanged instead of updating.
Before you start

Verify whether you are currently opening the generated PDF in a standard web browser or a dedicated PDF desktop application, as browser rendering engines often lack advanced JavaScript execution capabilities.

Solution 1Recommended

View the PDF in a Supported Desktop Reader

Use a dedicated desktop PDF reader capable of executing Acrobat JavaScript to dynamically render barcode fields.

PDF barcode and QR code fields require a compatible JavaScript engine to recalculate and redraw the barcode image based on the underlying text value. Most web browsers (like Chrome or Edge) and server-side viewers do not support these dynamic calculations, causing them to display plain text or fail to update.

1
Download the PDF file

Save the generated PDF document from your ServiceNow instance to your local computer.

2
Open with a desktop application

Right-click the downloaded file, select 'Open with', and choose a dedicated desktop PDF reader such as WPS Office or Adobe Acrobat instead of your web browser.

3
Enable JavaScript execution

If prompted by your PDF software's security settings, click 'Options' or 'Preferences' and ensure that JavaScript execution is enabled so the barcode fields can properly refresh.

View the PDF in a Supported Desktop Reader
Desktop Requirement: Server-side PDF generation tools typically only inject the value; the actual visual rendering of the QR code occurs on the client side when the file is opened in a supported application.
Professional PDF Viewer & Editor

View and Edit Complex PDF Forms with WPS Office

WPS Office provides a comprehensive PDF toolkit that supports advanced PDF form viewing and reliable rendering on your desktop, avoiding the display limitations of standard web browser viewers.

  1. 1. Download WPS Office: Visit the official WPS website to download and install the free WPS Office suite on your desktop computer.
  2. 2. Open the PDF file: Launch the WPS PDF tool and open your ServiceNow-generated PDF document.
  3. 3. View and interact: View your form fields and QR codes exactly as they are intended to be displayed with full desktop rendering support.
Accurate rendering of complex PDF forms and interactive fieldsHigh compatibility with standard PDF formats including Adobe Acrobat filesLightweight, fast-loading, and completely free to downloadSeamless integration with Word, Excel, and PowerPoint file formats
microsoft office alternative - wps office

Frequently Asked Questions

Why does my PDF QR code show as plain text in Chrome?

Web browsers like Chrome and Edge use lightweight, built-in PDF viewers that do not support the Adobe JavaScript calculations required to dynamically render barcode or QR code images from text values.

Can ServiceNow natively render PDF barcodes on the server side?

ServiceNow can successfully fill text fields in a PDF, but standard server-side PDF generation often lacks the dynamic rendering engine needed to convert that text into a visible barcode image before the file is downloaded.

How do I ensure my PDF barcode field updates automatically?

You must link the barcode field to a corresponding text field within the PDF form's calculation properties, and the final file must be opened in a desktop PDF reader that supports JavaScript execution.