Closed satramcs closed 4 months ago
@satramcs Thank you for reporting it. Could you please tell me what version of Gotenberg you're currently using? This is important as the singlePage
property was introduced starting from Gotenberg version 8.2.0.
I'm using this chromiumly 2.9.0 package.
This package is require gotenberg docker image to be run. As per documentation I'm running docker run --rm -p 3000:3000 gotenberg/gotenberg:8
this docker image
@satramcs Unfortunately, Gotenberg only supports the singlePage
property when converting with Chromium. LibreOffice does not have a support for this page property yet π https://gotenberg.dev/docs/routes#page-properties-libreoffice.
The convert
method in the PDFEngine
is simply a wrapper for Gotenberg's LibreOffice convert route. Currently, the only properties supported are landscape
and nativePageRanges
. That is why when using the singlePage
property in your code, no action occurs because this property is not supported.
const buffer = await PDFEngine.convert({
files: [path.join(__dirname, "/resources/test-file.xlsx")],
properties: { singlePage: true },
});
I hope this helps clarify things.
Thank you for your clarification. Do we have any other solution to export the excel sheet to single page using libreoffice? (any configuration on the docker side) "Whole sheet export" with this option
@satramcs I'm not very knowledgeable about that topic π but perhaps you could find assistance by asking in the Gotenberg discussions.
Problem statement: I need the entire excel sheet to single page in pdf so that the excel sheet should not broken. There is a option in libreoffice calc "Whole sheet export" (Please refer the screenshot)
I need to enable the whole sheet export option while converting the xlsx to pdf. So I've set the property
singlePage: true
but it doesn't not works.Please let me know if there is any other way to enable the Whole sheet export option Sample code: