diff --git a/bbb-export-annotations/config/settings.json b/bbb-export-annotations/config/settings.json index 0685c34fe4..37610b7807 100644 --- a/bbb-export-annotations/config/settings.json +++ b/bbb-export-annotations/config/settings.json @@ -7,7 +7,7 @@ "presAnnDropboxDir": "/tmp/pres-ann-dropbox" }, "collector": { - "backgroundSlidePPI": 350 + "pngWidthRasterizedSlides": 2048 }, "process": { "whiteboardTextEncoding": "utf-8", diff --git a/bbb-export-annotations/workers/collector.js b/bbb-export-annotations/workers/collector.js index 3e07ce57ac..5bfc15c7c2 100644 --- a/bbb-export-annotations/workers/collector.js +++ b/bbb-export-annotations/workers/collector.js @@ -70,14 +70,14 @@ let exportJob = JSON.parse(job); // CairoSVG doesn't handle transparent SVG and PNG embeds properly, e.g., in rasterized text. // So textboxes may get a black background when downloading/exporting repeatedly. // To avoid that, we take slides from the uploaded file, but later probe the dimensions from the SVG - // so it matches what was shown in the browser -- Tldraw unfortunately uses absolute coordinates. + // so it matches what was shown in the browser. let extract_png_from_pdf = [ 'pdftocairo', '-png', '-f', pageNumber, '-l', pageNumber, - '-r', config.collector.backgroundSlidePPI, + '-scale-to', config.collector.pngWidthRasterizedSlides, '-singlefile', '-cropbox', pdfFile, outputFile, diff --git a/bbb-export-annotations/workers/process.js b/bbb-export-annotations/workers/process.js index 8f06aaa8b3..09a6081294 100644 --- a/bbb-export-annotations/workers/process.js +++ b/bbb-export-annotations/workers/process.js @@ -796,14 +796,12 @@ for (let currentSlide of pages) { if (err) { return logger.error(err); } }); - // Dimensions converted back to a pixel size which, + // Dimensions converted to a pixel size which, // when converted to points, will yield the desired // dimension in pixels when read without conversion - // e.g. say Tldraw's canvas is 1920x1080 px. - // The background SVG dimensions are set to 1920x1080 pt (incorrect unit). - // So we read it in ignoring the unit as 1920x1080 px, making the position of the drawings match. - // Now we assume we had 1920x1080pt and resize to 2560x1440 px so that the SVG generates with the original "wrong" size. + // e.g. say the background SVG dimensions are set to 1920x1080 pt + // Resize output to 2560x1440 px so that the SVG generates with the original size in pt. let convertAnnotatedSlide = [ 'cairosvg',