We are using the following command line to convert from .xlsm files to .pdf files: `soffice --convert-to pdf --outdir testdir <input-xlsm-file>` This works perfectly for most documents we test with, but we have now received two specific .xlsm files where this command hangs indefinitely. Due to privacy issues, I can not attach the .xlsm files with the issues in this bug report. Please reach out for more details. Is is possible to ensure that the command above never hangs indefinitely but instead fails with an error?
Can you open the files with LibreOffice? Please attach a sample file, reduce the size as much as possible without private information, and paste the information in Menu/Help/About LibreOffice, there is a copy icon.
Created attachment 197945 [details] File to reproduce the issue Here is a file that can be used to reproduce the issue. I suspect that the issue occurs due to the use of the `Application.LanguageSettings.LanguageID` method in the `ConvertUserInput` code module. It makes sense that LibreOffice doesn't handle this. However, I would argue that the converter should exit with an error instead of hanging in this case.
Created attachment 197947 [details] Screenshot of the running convert-to With your sample file, I can't reproduce the issue.
I can see that you are using version 24.2.7. I'm running version 24.8.3.2. In particular: LibreOffice 24.8.3.2 48a6bac9e7e268aeb4c3483fcf825c94556d9f92 The file conversion hangs on my Windows PC when running this conversion, but it also hangs on Linux. I have attached an image of the state where it hangs.
Created attachment 197949 [details] Screenshot of the hanging process
I can reproduce the hang on a Mac using the the sample file and: Version: 24.8.3.2 (AARCH64) / LibreOffice Community Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92 CPU threads: 8; OS: macOS 15.1.1; UI render: default; VCL: osx Locale: en-GB (en_GB.UTF-8); UI: en-US Calc: threaded
I can confirm the hang while export to PDF Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: c034a21f359db6bd8ba7b4938d4501bbcc87e21d CPU threads: 16; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win Locale: ru-RU (ru_RU); UI: ru-RU Calc: CL threaded but, the Print preview shows over 38000 pages! Of course the export to PDF will take a age time Tobias, are you sure you need the cell background color for *all* cells on the sheet in the document? Because even if these cells have no data Calc all these cells with background color includes to print range.
Hi Roman. Thanks for taking a look at this. That definitely explains why the export takes for ages. Is it somehow possible to control the exported area programatically, or potentially set an upper limit on the number of exported pages? I have tried removing the background color from all cells in the document, but this still seems to make the export hang. Do I need to do something else to get the size of the exported PDF down?
(In reply to Tobias Wolters from comment #8) > Hi Roman. > I have tried removing the background color from all cells in the document, > but this still seems to make the export hang. Do I need to do something else > to get the size of the exported PDF down? Yes, you have also all call borders there :D Select all sheet and just delete it all and then select only needed you cell range and set up borders only for it
That solves the issue - thanks! Is there any way to programmatically set an upper limit on the number of PDF pages to convert when converting with the `soffice` utility?
https://help.libreoffice.org/latest/he/text/shared/guide/pdf_params.html?&DbPAR=SHARED&System=WIN