Bug 156693 - IMPORT images: use image size as page size
Summary: IMPORT images: use image size as page size
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-09 08:50 UTC by SATYA SRINIVAS K
Modified: 2024-10-01 13:05 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test.png (2.07 KB, image/png)
2023-08-09 08:50 UTC, SATYA SRINIVAS K
Details
PDF_From_Soffice.pdf (3.63 KB, application/pdf)
2023-08-09 08:51 UTC, SATYA SRINIVAS K
Details
PDF_From_Adobe.pdf (11.01 KB, application/pdf)
2023-08-09 08:51 UTC, SATYA SRINIVAS K
Details
Image.wmf: google suggests "unoconv Image.wmf" which uses LO to convert (3.16 KB, image/wmf)
2023-08-09 15:35 UTC, Justin L
Details
Test_Emf.emf (1.29 MB, image/x-emf)
2023-08-10 04:13 UTC, SATYA SRINIVAS K
Details
Test_Emf_Converted_From_Adobe.pdf (140.42 KB, application/pdf)
2023-08-10 04:14 UTC, SATYA SRINIVAS K
Details
Test_Emf_Exported_From_Libreoffice.pdf (80.88 KB, application/pdf)
2023-08-10 04:14 UTC, SATYA SRINIVAS K
Details
Test_Emf_1_Expected.pdf (861.26 KB, application/pdf)
2023-08-22 07:29 UTC, SATYA SRINIVAS K
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SATYA SRINIVAS K 2023-08-09 08:50:12 UTC
Description:
Published pdf page size is always in Letter, I think this is based on locale settings(Tools->Options->Language Settings->Languages->locale settings->Default-English(USA).)

I would like to produce PDF same as what adobe is doing, that is PDF page size same as original input image size.

Steps to Reproduce:
1.convert attached test.png to pdf using the following command
<path to soffice.exe> --convert-to pdf --outdir <my_output_directory> test.png

2.Compare the attached pdf converted from soffice.exe and with adobe.


Actual Results:
The page size is defaults to Letter/A4 based on configuration.

Expected Results:
PDF page size should be same as input image size.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Attachments:"Test.png","PDF_From_Adobe.pdf" and "PDF_From_Soffice.pdf"
Comment 1 SATYA SRINIVAS K 2023-08-09 08:50:45 UTC
Created attachment 188865 [details]
Test.png
Comment 2 SATYA SRINIVAS K 2023-08-09 08:51:06 UTC
Created attachment 188866 [details]
PDF_From_Soffice.pdf
Comment 3 SATYA SRINIVAS K 2023-08-09 08:51:24 UTC
Created attachment 188867 [details]
PDF_From_Adobe.pdf
Comment 4 Justin L 2023-08-09 15:35:06 UTC
Created attachment 188881 [details]
Image.wmf: google suggests "unoconv Image.wmf" which uses LO to convert

The real desire here is for EMF files -> PDF. Imagemagick apparently doesn't support that, so LibreOffice is the defacto converter for EMF files, which makes this bug report semi-legit. (I would not consider it legit for png etc files, since LibreOffice is not a command line image converter).
Comment 5 SATYA SRINIVAS K 2023-08-10 04:13:46 UTC
Created attachment 188891 [details]
Test_Emf.emf
Comment 6 SATYA SRINIVAS K 2023-08-10 04:14:10 UTC
Created attachment 188892 [details]
Test_Emf_Converted_From_Adobe.pdf
Comment 7 SATYA SRINIVAS K 2023-08-10 04:14:32 UTC
Created attachment 188893 [details]
Test_Emf_Exported_From_Libreoffice.pdf
Comment 8 SATYA SRINIVAS K 2023-08-22 07:29:21 UTC
Created attachment 189090 [details]
Test_Emf_1_Expected.pdf
Comment 9 Mike Kaganski 2023-08-22 08:56:43 UTC
The actual request here is completely correct, and is not related to the *conversion*, but to import:

Whenever we import any file, we must use as much information in the file, as possible. When we import DOC, we import its page sizes; when we import PDF, we also import its page size (the first, when we talk about Draw import - bug 49787).

The same must happen when we import any graphic file (PNG / SVF / EMF / ...). Whenever there is an information about the image size (for raster images, at least pixel size is always present, so may be used even in the absence of PPI info, based on "standard" pixel definition e.g. from CSS), we must not ignore it, as if we insert it into some default document.