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: 2021-05-14 04:09 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)