| Summary: | Draw -> Insert -> Image... PDF file incorrectly scaled | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Simon Banton <simon> |
| Component: | Draw | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | aron.budea, jluth, quikee, simon, vmiklos, vsfoote |
| Priority: | medium | ||
| Version: | 6.3.5.2 release | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=133546 https://bugs.documentfoundation.org/show_bug.cgi?id=138968 https://bugs.documentfoundation.org/show_bug.cgi?id=138969 |
||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 116082 | ||
| Attachments: |
Screenshot of same PDF used as Page Background and when Image -> Insert... is used
A4-sized PDF file for testing |
||
|
Description
Simon Banton
2020-04-07 22:47:37 UTC
Created attachment 159403 [details]
Screenshot of same PDF used as Page Background and when Image -> Insert... is used
(It's been highlighted to me that Set Background Image automatically scales to fit the entire page anyway, so ignore that element of the report and please just focus on the Insert -> Image ... aspect) I don't find any issue with the unconstrained pdfium import 'insert image' filter implemented for bug 89727 -- it sizes inside margins for the page, section or frame being targeted. Size resolution of the source PDF is secondary to fitting the target. @Miklos? Please attach a reproducer pdf image and specify what is the expected and actual size of the inserted image shape. Otherwise it's not easy to test this. Thanks! Tomaz and Kendy did recent work on this front, so that the PDF rendering happens at display time, rather than import time. This might also help with the scaling, i.e. the rendered bitmap size would be ideally dependent on the in-doc size, not the original pdf size. But I didn't follow that in detail. So make sure to test LO master as well, it has improvements since 6.3. See core.git commit 6ac2d66c78d6c080aabfa46157113684c2f3a3b0 e.g. Created attachment 159443 [details]
A4-sized PDF file for testing
This test page was created in Draw at A4 size and comprises a box drawn at 210 x 297mm surrounding a box drawn at 100 x 100mm.
It was exported to PDF using File -> Export Directly as PDF and then Insert -> Image... was used to import it into a new Draw document of A4 size with margins set to zero.
When imported, the size of the outer box is measured at 156.1mm x 220.9mm, and that of the inner at 74.5mm x 74.5mm.
The PDF's media box and crop box dimensions are both 595.28 x 841.89 points.
FTR: original discussion on https://ask.libreoffice.org/en/question/237379/pdf-file-scaled-down-when-insert-image-used-in-draw/ I have just installed LO 5.4.7.2 into a Windows XP VMWare instance and the Test.pdf file Insert -> Image... imports at the correct size into an A4 Draw document with zero margins. Therefore, it appears that this is an Mac OSX-specific issue. For info: my system is a MacBook Pro (Retina, 15-inch, Mid 2015) running OS X 10.11.6 (El Capitan). Two screencasts from the mentioned discussions: mine where I can't reproduse the problem: https://drive.google.com/open?id=1CS93oPHVfvmj4orcrpOsk7aCN5SEP-8Q OP's with the problem demonstrated: https://drive.google.com/open?id=1599wTyOO_GitLqDZWInq5tBEmXLxSich This is not macOS-specific; this is HiDPI-specific. Note the "retina" bit in comment 7. Repro with Version: 6.4.3.1 (x64) Build ID: 4d2b2b47cca498fed6abf712a36d0788901091eb CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; Locale: ru-RU (ru_RU); UI-Language: en-US Calc: CL *when using GUI scaling* (tested with scaling set to 150%). And no repro without the scaling on the same system. By the way, in current master, I see the image scaled up (to fit margins of A1 that I used in testing), but is placed shifted (not from margins). No idea how 6ac2d66c78d6c080aabfa46157113684c2f3a3b0 is involved in this (but the physical size should had been kept IMO). Please retest this bug report against master. A number of pdf insert fixes have arrived in LO 7.4 that might have resolved this. (I'm having trouble following the logic of this issue, and I don't have a HiDPI screen anyway.) (In reply to Justin L from comment #10) No repro with Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 3b59b4a2ef316209c501eef0fcb935d9005ea18f CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: cs-CZ (ru_RU); UI: en-US Calc: CL |