From 4c4ae8a1ada7eea29fdb16fe5dbb982b63f5d0f0 Mon Sep 17 00:00:00 2001 From: Tomas Rutkauskas Date: Mon, 9 Nov 2026 10:36:30 +0200 Subject: [PATCH] docs: pdf-to-jpg README snippet without ScaleImage; split example links 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 --- README.md | 7 ++++--- .../java/com/convertapi/examples/SplitAndMergePdf.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cb65b2c..b32259c 100644 --- a/README.md +++ b/README.md @@ -74,9 +74,10 @@ parameters and explanations can be found [here](https://www.convertapi.com/conve ```java CompletableFuture result = ConvertApi.convert("pdf", "jpg", new Param("file", Paths.get("test.pdf")), - new Param("scaleimage", "true"), - new Param("scaleproportions", "true"), - new Param("imageheight", 300) + new Param("pagerange", "1"), + new Param("imagewidth", 300), + new Param("imageheight", 300), + new Param("fittosize", "true") ); ``` diff --git a/examples/src/main/java/com/convertapi/examples/SplitAndMergePdf.java b/examples/src/main/java/com/convertapi/examples/SplitAndMergePdf.java index 7da120c..7ce4061 100644 --- a/examples/src/main/java/com/convertapi/examples/SplitAndMergePdf.java +++ b/examples/src/main/java/com/convertapi/examples/SplitAndMergePdf.java @@ -15,7 +15,7 @@ /** * Example of extracting the first and the last page from PDF and then chaining merge conversion. - * https://www.convertapi.com/pdf-to-extract + * https://www.convertapi.com/pdf-to-split * https://www.convertapi.com/pdf-to-merge */ public class SplitAndMergePdf {