Bug 42871 - Command line conversion of html to pdf using convert to produces pdfs that don't look like html
Summary: Command line conversion of html to pdf using convert to produces pdfs that do...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.4.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Commandline
  Show dependency treegraph
 
Reported: 2011-11-13 01:14 UTC by Rob Hutton
Modified: 2023-05-15 03:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Input html file (80 bytes, text/html)
2012-01-07 16:04 UTC, tester8
Details
Big Image (764.81 KB, image/png)
2012-01-07 16:05 UTC, tester8
Details
What I get with commang line (175.64 KB, application/pdf)
2012-01-07 16:07 UTC, tester8
Details
What I get with graphical interface (176.01 KB, application/pdf)
2012-01-07 16:08 UTC, tester8
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Hutton 2011-11-13 01:14:27 UTC
Using a simple html file like:

<html>
<body>
<h1>THIS IS SOME TEXT</h1>
<img src="image.png"/>
</body>
</html>

Where the image is big enough to push it to the second page;

Using the command line

loffice --convert-to pdf infile.html

the pdf produced does not match the html.  The first page is blank, "THI" of "THIS" are cut off (reproduced on multiple attempts), and the image is drawn very small following the text.

If you open the html file in the GUI and click on the Export Directly as PDF button, the pdf looks the same as the html.
Comment 1 tester8 2012-01-07 16:02:46 UTC
Reproduced with

LOdev 3.5.0beta2 
4ca392c-760cc4d-f39cf3d-1b2857e-60db978
Ubuntu 10.04.3 x86
Linux 2.6.32-37-generic Russian UI

Text and image is on the second page, first one is blank. Image is very small.
In my case it is "S IS SOME TEXT".
Comment 2 tester8 2012-01-07 16:04:05 UTC
Created attachment 55275 [details]
Input html file
Comment 3 tester8 2012-01-07 16:05:35 UTC
Created attachment 55276 [details]
Big Image
Comment 4 tester8 2012-01-07 16:07:15 UTC
Created attachment 55277 [details]
What I get with commang line
Comment 5 tester8 2012-01-07 16:08:59 UTC
Created attachment 55278 [details]
What I get with graphical interface
Comment 6 Riccardo Magliocchetti 2013-06-06 20:07:10 UTC
Confirm this on libreoffice-4-1 branch.
Comment 7 Shai Petel 2013-07-17 16:35:17 UTC
I noticed similar issue when converting MS word to PDF using command prompt - it doesn't work well, but when using GUI it works well.

Seems that there is an underlying issue with command prompt export to PDF that does not use the same code or context as the GUI.

Is it possible at all to merge the 2 conversions to work in the same way?

See my issue #67005

Thanks!
Comment 8 QA Administrators 2015-04-01 14:42:17 UTC Comment hidden (obsolete)
Comment 9 tommy27 2016-04-16 07:25:06 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2019-05-14 02:56:11 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2021-05-14 04:09:53 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2023-05-15 03:17:33 UTC
Dear Rob Hutton,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug