Repository navigation
README pdf-to-jpg snippet without ScaleImage/ScaleProportions; split example links pdf-to-split - #57
Merged
Merged
Conversation
…ks pdf-to-split The README "Additional conversion parameters" snippet passed scaleimage and scaleproportions to pdf -> jpg. Neither is a pdf-to-jpg parameter, and the API ignores them. The snippet now turns page 1 into a JPG that fits inside 300x300: pagerange, imagewidth, imageheight and fittosize. The SplitAndMergePdf.java comment linked the pdf-to-extract page, although the example uses split. It now links https://www.convertapi.com/pdf-to-split. 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 for the PDF conversion documentation corrections.
No open issues 🎉
What changed in this PR
This PR corrects the Java library’s conversion documentation without changing library behavior.
Changes:
- Replaces unsupported PDF-to-JPG parameters in the README with parameters that convert page 1 to a JPG fitting within 300×300 pixels.
- Corrects the split-and-merge example’s documentation link to point to the PDF split converter.
| File | Description |
|---|---|
README.md |
Updates the PDF-to-JPG snippet with page selection and supported image-sizing parameters. |
examples/src/main/java/com/convertapi/examples/SplitAndMergePdf.java |
Corrects the PDF split URL in a comment; executable code is unchanged. |
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.
Problem
scaleimageandscaleproportionstopdf -> jpg. Neither is a pdf-to-jpg parameter (spec), and the API ignores them silently, so readers copy two parameters that do nothing. They exist only on jpg-to-jpg (spec).SplitAndMergePdf.javalinked https://www.convertapi.com/pdf-to-extract (now the AI data-extraction converter), although the example usessplit.Change
test.pdfbecomes a JPG that fits inside 300x300, withpagerange1,imagewidth300,imageheight300 andfittosize"true". Withoutfittosize, pdf-to-jpg applies the width and lets the height grow (300x388 for a US Letter page).Paramhas no boolean constructor, sofittosizeis a string, asscaleimagewas.SplitAndMergePdf.javalinks https://www.convertapi.com/pdf-to-split ("Split PDF API", checked in a browser on 2026-11-09).Verification
OpenJDK 27.0.1 with convertapi 2.13.1 from Maven Central (
./mvnw -f examples/pom.xml compile), against the production API on 2026-11-09.$TMPDIRstands for a local scratch folder.The README snippet, pasted verbatim into a
mainthat sets the token, then prints the cost and savesresult, run in a folder holdingtest.pdf(a copy ofexamples/src/main/resources/test.pdf):readme-snippet.jpgis 231x300 px, 8,858 bytes.SplitAndMergePdf(only its comment changed), run in a folder holdingfiles/test.pdf:qpdf --show-npages: the merged PDF has 2 pages,test.pdfhas 6.Only the README and an example comment change, not the library, so there is no CHANGELOG entry. This does not touch
CreatePdfThumbnail.java, which #56 fixes.The same README fix for Go is in ConvertAPI/convertapi-library-go#21 and for .NET in ConvertAPI/convertapi-library-dotnet#83.
🤖 Generated with Claude Code