Bug 157732 - LO hangs on specific PDF import (Draw GUI and command line conversion)
Summary: LO hangs on specific PDF import (Draw GUI and command line conversion)
Status: RESOLVED DUPLICATE of bug 113050
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: [url=https://basketballstarsfree.com/...
Whiteboard:
Keywords: filter:pdf
Depends on:
Blocks: PDF-Import-Draw
  Show dependency treegraph
 
Reported: 2023-10-13 01:29 UTC by siyi
Modified: 2024-09-06 09:22 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Command line conversion file to png card dead (6.48 MB, application/pdf)
2023-10-13 01:35 UTC, siyi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description siyi 2023-10-13 01:29:21 UTC
Description:
Bad example: It crashed and fix it now!

Steps to Reproduce:
1.Using the command line, convert the following pdf files to png files
2.--headless --convert-to pdf inputFile --outdir outputFolder

Actual Results:
The program enters an endless loop

Expected Results:
The pdf file can be converted successfully


Reproducible: Always


User Profile Reset: Yes

Additional Info:
none
Comment 1 siyi 2023-10-13 01:35:53 UTC
Created attachment 190179 [details]
Command line conversion file to png card dead
Comment 2 Stéphane Guillou (stragu) 2023-10-13 05:45:38 UTC
1. Please don't ask to "fix it now!", this is quite rude and many people work on a volunteer basis for this project.
2. You talk about converting from PDF to PNG but your command converts to PDF. Please clarify.
3. Please test with the latest release

Thank you
Comment 3 siyi 2023-10-13 06:15:45 UTC
Correct command line arguments:--headless --convert-to png inoutFile --outdir outputFolder
Comment 4 siyi 2023-10-13 06:16:32 UTC
This problem still occurs in the latest version
Comment 5 Stéphane Guillou (stragu) 2023-10-13 13:12:43 UTC
I tested with:

libreoffice7.6 --headless --convert-to png renamed.pdf

Indeed, the process hangs. I stopped it after three minutes.
But I was able to use the same command on other sample PDFs (single-page and multi-page).

This kind of conversion should work, at least for the first page: https://ask.libreoffice.org/t/convert-total-pdf-pages-into-images-command-line/5377
https://stackoverflow.com/questions/41802507/how-to-convert-pdf-files-to-jpg-with-soffice-command
For converting all pages, see this Ask.LO question, which suggests an imageMagick option: https://ask.libreoffice.org/t/use-soffice-to-convert-from-doc-to-png-images/41621

So the issue lies in this particular sample file.
LO also hangs on importing the PDF into Draw.

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Same in OOo 3.3, so inherited.
Comment 6 Stéphane Guillou (stragu) 2023-10-13 13:15:09 UTC
With a recent trunk build, I get in the terminal many repeated:

warn:sdext.pdfimport:548997:548997:sdext/source/pdfimport/tree/pdfiprocessor.cxx:121: PDFIProcessor::setMiterLimit(): not supported by ODF

Then it gets stuck after one:

warn:xmloff:548997:548997:xmloff/source/draw/ximpstyl.cxx:365: unknown attribute urn:oasis:names:tc:opendocument:xmlns:style:1.0 style:writing-mode value=lr-tb
Comment 7 Dave Gilbert 2024-02-29 13:55:54 UTC
Seems to work with my fix of tdf#113050 and I see that the file does use that type of fill; all the slides have this pretty stippled background.

*** This bug has been marked as a duplicate of bug 113050 ***
Comment 8 Marlin Cuvalis 2024-09-06 09:20:26 UTC
Troubleshooting LO Hang on PDF Import
1. Understanding the Issue:
When LibreOffice (LO) hangs during a specific PDF import, it could be due to several factors:
- Complex PDF Structure: The PDF file might have a complex structure with embedded fonts, images, or annotations that LO struggles to process.
- Corrupted PDF: The PDF file could be corrupted or damaged, preventing LO from reading it correctly.
- Insufficient System Resources: LO might require more memory or processing power to handle the PDF import, especially for large or complex files.
- LO Bug or Compatibility Issue: There could be a known bug in LO or a compatibility issue with the specific PDF format or software used to create it.
2. Troubleshooting Steps:
- Check PDF Integrity:
Use a PDF validator tool to verify if the PDF file is corrupted.
Try opening the PDF in another PDF reader or viewer to see if it opens without issues.
- Simplify the PDF:
If possible, simplify the PDF by removing unnecessary elements like embedded fonts or high-resolution images.
Consider converting the PDF to another format (e.g., DOCX) and then importing it into LO.
- Increase System Resources:
Ensure your system has enough RAM and processing power to handle the PDF import.
Close unnecessary applications to free up system resources.
- Update LO and Drivers:
Make sure you're using the latest version of LO and that your graphics drivers are up-to-date.
- Try Different Import Settings:
Experiment with different import settings in LO, such as changing the import mode or disabling specific features.
- Use a Third-Party Converter:
If the issue persists, consider using a third-party PDF-to-ODF converter. These tools might be able to handle complex PDFs more effectively.
- Report the Bug:
If you're unable to resolve the issue, report it to the LO community or file a bug report with the developers.
Comment 9 Marlin Cuvalis 2024-09-06 09:22:56 UTC
(In reply to Marlin Cuvalis from comment #8)
> Troubleshooting LO Hang on PDF Import
> 1. Understanding the Issue:
> When LibreOffice (LO) hangs during a specific PDF import, it could be due to
> several factors:
> - Complex PDF Structure: The PDF file might have a complex structure with
> embedded fonts, images, or annotations that LO struggles to process.
> - Corrupted PDF: The PDF file could be corrupted or damaged, preventing LO
> from reading it correctly.
> - Insufficient System Resources: LO might require more memory or processing
> power to handle the PDF import, especially for large or complex files.
> - LO Bug or Compatibility Issue: There could be a known bug in LO or a
> compatibility issue with the specific PDF format or software used to create
> it.
> 2. Troubleshooting Steps:
> - Check PDF Integrity:
> Use a PDF validator tool to verify if the PDF file is corrupted.
> Try opening the PDF in another PDF reader or viewer to see if it opens
> without issues.
> - Simplify the PDF:
> If possible, simplify the PDF by removing unnecessary elements like embedded
> fonts or high-resolution images.
> Consider converting the PDF to another format (e.g., DOCX) and then
> importing it into LO.
> - Increase System Resources:
> Ensure your system has enough RAM and processing power to handle the PDF
> import.
> Close unnecessary applications to free up system resources.
> - Update LO and Drivers:
> Make sure you're using the latest version of LO and that your graphics
> drivers are up-to-date.
> - Try Different Import Settings:
> Experiment with different import settings in LO, such as changing the import
> mode or disabling specific features.
> - Use a Third-Party Converter:
> If the issue persists, consider using a third-party PDF-to-ODF converter.
> These tools might be able to handle complex PDFs more effectively.
> - Report the Bug:
> If you're unable to resolve the issue, report it to the LO community or file
> a bug report with the developers.
https://basketballstarsfree.com