PDF to GIF API
Transform PDF pages into crisp GIF thumbnails for social media, email campaigns, and web previews. Generate static or animated previews in milliseconds with our battle-tested conversion engine.
curl -X POST "https://api.xspdf.com/v1/convert/pdf-to-gif" \
-H "Authorization: Bearer $API_KEY" \
-d '{"input_url":"https://files.example.com/doc.pdf","options":{"animated":false,"width":800,"quality":"high"}}' PDF thumbnails shouldn't take hours to generate
Teams waste time wrestling with ImageMagick, unreliable SaaS tools, or building custom converters that break on edge cases.
Manual screenshot tools
Open PDF, screenshot, crop, export. Repeat 1,000 times. Your team's time is worth more than this.
Unreliable open-source scripts
ImageMagick breaks on complex PDFs. Ghostscript crashes randomly. pdftoppm outputs blurry images. You spend more time debugging than shipping.
Third-party tools that rate-limit you
Hit their queue limits during peak traffic. Watch your users wait. Pay exponentially more as you scale.
The hidden cost of DIY conversion
Engineering time debugging format edge cases: 40+ hours/month. Infrastructure for concurrent processing: $800+/month. Lost revenue from slow preview generation: Immeasurable.
One API call. Perfect GIF thumbnails. Every time.
390ms average conversion
Upload PDF URL, get back optimized GIF thumbnail. Static or animated previews. Custom dimensions and quality settings. No queues, no delays.
Works with every PDF format
Complex layouts, embedded fonts, vector graphics, transparency. We've tested millions of PDFs so you don't have to worry about edge cases.
Enterprise-grade security
SOC 2 certified. Files encrypted at rest and in transit. Auto-deleted after 24 hours. GDPR compliant with EU data residency options.
500 conversions free every month. No credit card required. See FAQ
import requests
API_KEY = "your_api_key"
response = requests.post(
"https://api.xspdf.com/v1/convert/pdf-to-gif",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"input_url": "https://files.example.com/doc.pdf",
"options": {
"animated": False,
"width": 800,
"quality": "high"
}
}
)
gif_url = response.json()["output_url"]
print(f"GIF ready: {gif_url}") Built for production workflows
Everything you need to generate, customize, and deliver GIF previews at scale.
Static or animated output
Generate single-frame thumbnails or multi-page animated GIFs. Perfect for social shares or document carousels.
Custom dimensions and quality
Set width, height, DPI, and compression. Optimize for web, email, or high-res displays. Maintain aspect ratio automatically.
Page-specific rendering
Extract first page, last page, or specific ranges. Control frame delay for animations. Generate thumbnails for entire documents or single pages.
Webhook notifications
Get notified when conversion completes. Perfect for async workflows and batch processing pipelines.
Usage analytics dashboard
Track conversion volumes, success rates, and API latency. Monitor costs and optimize your integration.
Auto-expiring CDN URLs
Files served from global CDN with optional expiration. Download or stream directly. Full control over retention policies.
Frequently asked questions
What's the difference between static and animated GIF output?
Static GIFs render a single PDF page as one image frame. Animated GIFs convert multiple pages into a looping animation.
Use static for thumbnails and previews. Use animated for document carousels, social media posts, or showcasing multi-page content. Set animated: true and specify page ranges.
Can I control GIF quality and file size?
Yes. Use the quality parameter: "low", "medium", or "high". Set width and height to control dimensions.
Lower quality and smaller dimensions reduce file size. High quality maintains crisp text and graphics. We automatically optimize color palettes for best compression.
How fast is the conversion process?
Median conversion time is 390ms for standard single-page PDFs. Multi-page or complex documents may take 1-3 seconds.
All requests are processed in real-time with no queuing. Use webhooks for async workflows if you need to process large batches without blocking.
Do you store my PDF files permanently?
No. Input PDFs and output GIFs are automatically deleted after 24 hours. You can configure shorter retention periods or request immediate deletion after download.
All files are encrypted at rest and in transit. We're SOC 2 certified and GDPR compliant. Enterprise plans include custom retention policies and private storage regions.
What SDKs and languages do you support?
Official SDKs for Python, Node.js, Ruby, PHP, Go, and Java. REST API works with any language that can make HTTP requests.
All SDKs include TypeScript support, automatic retries, and built-in error handling. Check our docs for code examples and integration guides.
Start converting PDFs to GIFs in 5 minutes
500 free conversions every month. No credit card required. Scale to millions with transparent pricing.