How to Customize PDF Save Location with Adobe View SDK
Question details
The user wants to programmatically specify or customize the local save directory for PDF files processed via the Adobe View SDK Save API.

- Product
- Adobe View SDK
- Device & OS
- not provided
- Scenario
- Using the Adobe View SDK Save API in a web application to handle and save PDF content locally.
- Observed behavior
- Web browsers prevent websites and web applications from directly selecting or writing to a user's local save directory due to strict security restrictions.
Understand that modern web browsers enforce strict security sandboxing that prevents any web application, including those using the Adobe View SDK, from directly writing to a specific folder on a user's local file system.
Trigger a Standard Browser Download
Use the Save API to capture the PDF buffer and prompt the user to download the file using standard browser behaviors, allowing them to choose their own save location.
Because of browser security constraints, you cannot hardcode a local file path in your web application. Instead, you can process the file buffer provided by the Save API and create a Blob URL to trigger a standard download dialog. This leaves the final destination choice in the hands of the user.
Set up the registerSaveApiHandler in your Adobe View SDK configuration to intercept the PDF content array buffer when the user clicks save.
Convert the received array buffer into a JavaScript Blob object, specifying the MIME type as 'application/pdf'.
Create an object URL for the Blob using URL.createObjectURL(). Assign this URL to a temporary hidden <a> element with a download attribute, and programmatically trigger a click event to open the browser's save dialog.

Save PDF Data to a Remote Server
If you require strict programmatic control over where the modified PDF file is stored, you must send the PDF buffer directly to your backend server rather than the local file system.
Use WPS Office to Easily Manage and Save PDF Files Locally
While web applications are restricted by browsers from choosing local save locations, using a desktop application like WPS Office gives you full control over where your PDFs are stored, along with powerful editing capabilities.
- 1. Open PDF in WPS Office: Launch WPS Office and open your desired PDF document directly from your local hard drive.
- 2. Edit or Modify the Document: Use the built-in PDF tools on the top ribbon to add text, annotations, or make necessary modifications.
- 3. Choose Custom Save Location: Click on 'Menu' in the top left corner and select 'Save As' to open your operating system's local file explorer.
- 4. Save the File: Navigate to your preferred destination folder, name the file, and click 'Save' to bypass web browser restrictions entirely.

Frequently Asked Questions
Can I bypass browser security to save a PDF directly to a specific folder?
No, modern web browsers intentionally sandbox web applications. You cannot programmatically force a file to save to a specific local folder (like 'C:\Documents') without the user explicitly choosing it or relying on their default browser download settings.
How do I change the default download location for PDFs in my browser?
Users can change this by navigating to their browser's settings (e.g., Settings > Downloads in Google Chrome) and either specifying a new default folder or toggling the option to 'Ask where to save each file before downloading'.
Does the Adobe View SDK provide a way to automatically upload edited PDFs to a cloud service?
The SDK itself provides the PDF buffer via the Save API. You must implement your own backend logic to receive this buffer and upload it to your preferred cloud service, such as AWS S3, Google Drive, or your own proprietary server.
Why does the Adobe Save API return an array buffer instead of a file?
Returning an array buffer provides developers with maximum flexibility. It allows the web application to convert the buffer into a Blob for local user downloading, or stream it directly to a backend server via an API request.




