Description: 当我用 LibreOffice Draw 打开一些 PDF 的时候,出现奇怪的错误,比如 PDF 部分内容会被黑色方块块取代等。 其它软件几乎没有这样的错误 Deepl's translation results: When I use LibreOffice Draw to open some PDFs, strange errors appear, such as parts of the PDF will be replaced by black squares blocks, etc.. Other software almost no such errors Steps to Reproduce: 1. 使用 LibreOffice Draw 打开某些 PDF。(Use LibreOffice Draw to open some PDFs.) Actual Results: 部分内容被黑色方块取代(Part of the content is replaced by black squares) Expected Results: 内容正常加载(The content loads normally) Reproducible: Always User Profile Reset: No Additional Info: [Information automatically included from LibreOffice] Locale: zh-CN Module: DrawingDocument [Information guessed from browser] OS: Linux (All) OS is 64bit: yes ------------ The information from menu Help - About LibreOffice: Version: 7.5.3.2 (X86_64) / LibreOffice Community Build ID: 50(Build:2) CPU threads: 4; OS: Linux 6.1; UI render: default; VCL: gtk3 Locale: zh-CN (zh_CN.utf8); UI: zh-CN 7.5.3-2 Calc: threaded ------------ 我遇到的出问题的 PDF 都由 Google Chrome 生成。 (Deepl's translation results: The problematic PDFs I encountered were all generated by Google Chrome.)
Created attachment 188049 [details] One PDF that could not be loaded properly with LibreOffice Draw
Created attachment 188257 [details] BUG 复现(BUG Reproduction)
Confirm with Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 663db89378aa1f0425e795ef5d471f134e658dc4 CPU threads: 4; OS: Linux 5.19; UI render: default; VCL: gtk3 Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US Calc: threaded and Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Nothing new here. This is mostly caused by mismatch between the font names recorded to the PDF and the font names as installed to your system. The names don't match and the os attempts fall back replacment. When imported to Draw, we don't make much use of the minimal font set recorded into the PDF, and the rest of the draw objects get fallback which may or maynot result in good quality rendering of the text runs--even more of an issue with CJK fonts. However, the project also provides the Chromium projects "pdfium" based insert filter. Because it uses the exact fonts for strings contained in the PDF it can render with very good fidelity to the original PDF. The default resolution is set low for performance, but can be increased by setting a PDFIMPORT_RESOLUTION_DPI environment variable. Insertion of the PDF as an image at 600 dpi or 1200 dpi will satisfy most work flows for high quality rendering of PDF to an ODF document canvas. So, give the pdfium "Insert" filter a test. Issues with the PDF "Import" filter are unlikely to be fixed, especially the odd results for multi-byte glyph text streams.
Created attachment 188421 [details] no issue with PDF with Insert filter and 600dpi resolution as opposed to the Import filters
This was fixed by my recent b416c5b8e32632a63e1e791c34896e17d89f7982