Why Choose a Local Solution Over Adobe Acrobat Studio
The rise of artificial intelligence in office tools has transformed how we interact with our documents. Since 2024, Adobe offers an AI assistant integrated into its Acrobat Studio subscription for just €24.99 per month. This service lets you ask questions about a PDF, get a summary, or even navigate directly to the page containing the answer. However, that price far exceeds many personal chatbots and exposes your data to a third‑party server.
In contrast, a local AI remains entirely under your control: no data leaves your machine, you save on monthly fees, and you benefit from full flexibility to choose the model that best fits your needs. That’s exactly what we’ll explore today by integrating a Qwen3.6 model via Claude Code into SumatraPDF.
SumatraPDF: A Minimalist Yet Powerful PDF Reader
SumatraPDF is known for its simplicity, low footprint, and open source nature. It doesn’t support traditional plugins but offers two advanced options that open the door to external automation.
External Viewers – Open a PDF in Another Application
This feature allows you to launch another program with the file path and current page number. By combining this option with a script, you can pass those details to your local AI for real‑time content analysis.
Selection Handlers – Send Selected Text
When you highlight text in SumatraPDF, you have the option to copy it to a defined URL. Replacing the URL with a local endpoint (e.g., http://localhost:8000/analyze) creates a direct tunnel between your reader and AI model.
Step 1: Prepare the Local AI Environment
For this demonstration, we use the Qwen3.6 model available via Claude Code. First, install the following dependencies on your machine:
- Python 3.11 or newer
- pip install qwen-client flask
Then create a file app.py containing the following code:
from flask import Flask, request, jsonify
from qwen_client import QwenClient
app = Flask(__name__)
client = QwenClient(model="qwen-3.6")
@app.route('/analyze', methods=['POST'])
def analyze():
text = request.form.get('text')
response = client.chat("What is the summary of this text?", context=text)
return jsonify({'answer': response})
if __name__ == '__main__':
app.run(port=8000)
Run python app.py to launch your local server. It listens on port 8000 and receives POST requests containing text.
Step 2: Configure SumatraPDF to Communicate with the Local AI
In SumatraPDF, open Preferences → External Viewer. Add a new entry:
- Name: Local AI
- Link:
http://localhost:8000/analyze?text=%s
Then, in Selection Handlers, replace the URL with:
http://localhost:8000/analyze
When you select text and click the “Copy to Local AI” button, SumatraPDF automatically sends the content to the Flask server, which forwards it to Qwen3.6 for analysis.
“The real advantage of a local AI is total privacy: your data stays on your hard drive, no request goes to a public cloud.” – IT Security Expert
Step 3: Use the AI to Query Your PDFs
Once the server is running and SumatraPDF is configured, open any PDF file. To get a quick answer:
- Select a relevant passage.
- Click “Copy to Local AI”.
- In your terminal window, you’ll see the summary generated by Qwen3.6.
You can also modify the prompt sent to the model for specific questions, such as “Who is the author of chapter 4?” or “What are the key points of this section?”. The Flask server accepts these requests via a simple change in the app.py code.
Advantages and Limitations of the Solution
Benefits:
- No cost after initial setup.
- Guaranteed privacy, no leakage to external servers.
- Flexibility to tailor the model or prompt to your needs.
Limitations:
- Performance depends on your hardware (CPU/GPU).
- No native integration with PDF metadata (title, author).
- Maintenance required to update the model or Flask server.
Conclusion and Call to Action
By integrating a local AI into SumatraPDF, you gain the power of an intelligent assistant without recurring fees or privacy risks associated with cloud solutions. This approach is ideal for professionals handling sensitive documents or enthusiasts looking to experiment with AI at low cost.
Try this setup today, share your feedback in the comments, and feel free to suggest other models or improvements. Your experience could inspire the next generation of intelligent PDF tools!