How to Retrieve Azure Web API Data in an Acrobat PDF
Question details
Determine the feasibility and methods for using Acrobat JavaScript to fetch data from an Azure Web API and present it in a PDF custom dialog box.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Developing interactive PDF documents that require dynamic external data retrieval from cloud-hosted APIs.
- Observed behavior
- Users need to know how security settings, cross-domain rules, and the Acrobat JS environment restrict or allow HTTP requests to Azure endpoints.
Ensure you have access to the Azure Web API endpoints and the Adobe Acrobat SDK documentation, as network requests from PDFs are heavily regulated by built-in security features.
Evaluate Acrobat JavaScript and Security Restrictions
Understand how Acrobat's security settings and cross-domain rules impact API data retrieval and implement a controlled test.
Acrobat JavaScript does support interactive functionalities, including limited network access. However, fetching data from external APIs like an Azure-hosted Web API is strictly controlled by the software.
You must account for cross-domain policies, trusted function requirements, and potentially complex authentication methods that are not natively handled by standard PDF viewers.
Review the official Adobe Acrobat SDK documentation regarding network access and the Acrobat JavaScript environment to understand current security limitations and supported HTTP methods.
In your PDF application, navigate to Preferences > Trust Manager and adjust the Internet Access from PDF Files settings to permit connections to your specific Azure Web API domains.
Create a test PDF with a basic JavaScript script to ping the Azure API. Use a simple, unauthenticated endpoint first to verify that network traffic is successfully leaving the PDF without being blocked by cross-domain restrictions.
Once the data is successfully retrieved from the Azure Web API, use the `app.execDialog()` method in Acrobat JavaScript to construct a custom dialog box that parses and presents the JSON or XML data to the user.

Need a Powerful and Free PDF & Office Suite?
While highly specific JavaScript API integrations are restricted to Adobe Acrobat's SDK environment, WPS Office offers a comprehensive, free, and lightweight alternative for everyday PDF editing, form filling, and Office document management. Enjoy a familiar interface and seamless compatibility without the steep learning curve.

Frequently Asked Questions
Can I make cross-domain API calls from inside a PDF?
Yes, but it is heavily restricted. Acrobat requires the external domain to be explicitly trusted. Cross-domain access usually involves specific user permissions or configuring the PDF Trust Manager to allow outgoing network connections.
How do I display dynamic web data in a PDF?
You can use Acrobat JavaScript to fetch data and automatically update pre-existing form fields, or display the information using the `app.execDialog()` method to build and trigger a custom dialog box interface.
Are there security risks with retrieving external API data in a PDF?
Yes. Allowing PDFs to connect to external servers can expose users to security vulnerabilities. Because of this, standard PDF readers enforce strict security policies, and users may be prompted to approve the connection before any data is retrieved.




