From a0fc7cd074362351b11a0be35a1250562fc8226f Mon Sep 17 00:00:00 2001 From: Tomas Rutkauskas Date: Mon, 9 Nov 2026 15:47:00 +0200 Subject: [PATCH] README pdf-to-jpg snippet without ScaleImage/ScaleProportions pdf-to-jpg has no ScaleImage or ScaleProportions parameters, and the API ignores unknown parameters silently. With both ImageWidth and ImageHeight and no FitToSize, the width wins and the height grows, so the snippet turned a US Letter page into a 300x388 JPG. FitToSize 'true' keeps the image inside 300x300 (231x300 on production, 2026-11-09). Co-Authored-By: Claude Opus 5.5 --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index dc6a357..2c3edbf 100644 --- a/README.md +++ b/README.md @@ -78,10 +78,9 @@ parameters and explanations can be found [here](https://www.convertapi.com/conve // Converting PDF to JPG file let params = convertApi.createParams() params.add('file', e.currentTarget.files[0]) -params.add('ScaleImage', 'true') -params.add('ScaleProportions', 'true') params.add('ImageHeight', '300') params.add('ImageWidth', '300') +params.add('FitToSize', 'true') let result = await convertApi.convert('pdf', 'jpg', params) // Get result file URL