Repository navigation
Examples: convert ConvertAPI's demo page instead of Wikipedia - #127
Merged
Merged
Conversation
The URL-to-PDF example converted https://en.wikipedia.org/wiki/Data_conversion. Wikimedia answers ConvertAPI's renderer from the EU production nodes (the default v2.convertapi.com) with a 429 "Too many requests" page, so the result was a one-page PDF of that error, billed as a conversion. https://cdn.convertapi.com/public/files/demo is a page ConvertAPI owns; it converts to a two-page PDF with headings, a table, lists, a code block and an image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues with the example URL updates intended to avoid Wikimedia rate-limit pages.
No open issues 🎉
What changed in this PR
Updates both URL-to-PDF examples to use ConvertAPI’s demo page instead of Wikipedia, avoiding Wikimedia rate-limit error pages in generated PDFs.
Changes:
- Replaces the source URL with
https://cdn.convertapi.com/public/files/demoin both examples. - Leaves conversion parameters and all other code unchanged.
| File | Description |
|---|---|
examples/get_result_file_stream.js |
Uses the ConvertAPI demo URL for the streaming example. |
examples/convert_url_to_pdf.js |
Uses the ConvertAPI demo URL for the URL-to-PDF example. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The URL-to-PDF example converted https://en.wikipedia.org/wiki/Data_conversion. Wikimedia's edge answers ConvertAPI's renderer from the EU production nodes (the default
v2.convertapi.com) with a 429 "Too many requests. Please email noc@wikimedia.org" page, so anyone who ran the example got a one-page PDF of that error page, billed as a conversion.The example now converts https://cdn.convertapi.com/public/files/demo, a page ConvertAPI owns and keeps unchanged for examples and tests. It sits next to the
demo.pdf,demo.docxand other sample files, loads no scripts or third-party resources, and converts to a two-page PDF with headings, a table, lists, a code block and an image.Changed
examples/convert_url_to_pdf.jsandexamples/get_result_file_stream.js: theUrlvalue. Nothing else.Checked
Production
html -> pdfwith the example's parameters (Url=https://cdn.convertapi.com/public/files/demo,FileName=web-example) on 2026-11-09:v2.convertapi.com(EU)us-v2.convertapi.com(US)Both PDFs are Letter, titled "ConvertAPI demo page", with
demo.jpgembedded. The example itself was not re-run: only its URL string changed, and the call above uses the same converter and parameters.🤖 Generated with Claude Code