From 3d70c443f1ce46fb5cf13e5e0fe5b3ed10205911 Mon Sep 17 00:00:00 2001 From: Tomas Rutkauskas Date: Fri, 6 Nov 2026 16:48:29 +0200 Subject: [PATCH] PDF thumbnail example: fix the comment, keep the thumbnail inside 300x300 The example already converts page 1 straight to JPG, but its comment still described the old extract-then-convert chain and linked pdf-to-extract, which is now the AI data-extraction converter. ScaleImage and ScaleProportions are not pdf -> jpg parameters and the API ignored them, so the 300x300 request came back 300x388 for test.pdf. FitToSize keeps the thumbnail inside 300x300 (231x300). Co-Authored-By: Claude Opus 5.5 --- Examples/CreatePdfThumbnail/Program.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Examples/CreatePdfThumbnail/Program.cs b/Examples/CreatePdfThumbnail/Program.cs index e0e4408..d7b085c 100644 --- a/Examples/CreatePdfThumbnail/Program.cs +++ b/Examples/CreatePdfThumbnail/Program.cs @@ -11,8 +11,7 @@ class Program { /// /// Create PDF Thumbnail - /// Example of extracting first page from PDF and then converting it to JPG using chaining. - /// https://www.convertapi.com/pdf-to-extract + /// Example of converting the first page of a PDF to a JPG thumbnail. /// https://www.convertapi.com/pdf-to-jpg /// static async Task Main(string[] args) @@ -25,10 +24,9 @@ static async Task Main(string[] args) { var thumbnail = await convertApi.ConvertAsync("pdf", "jpg", new ConvertApiFileParam(pdfFile), - new ConvertApiParam("ScaleImage", "true"), - new ConvertApiParam("ScaleProportions", "true"), new ConvertApiParam("ImageHeight", "300"), new ConvertApiParam("ImageWidth", "300"), + new ConvertApiParam("FitToSize", "true"), new ConvertApiParam("PageRange", "1") );