【问题标题】:Html to pdf with libreoffice headless doesn't show imagesHtml to pdf with libreoffice headless 不显示图像
【发布时间】:2018-04-23 07:08:48
【问题描述】:

我正在使用 Libreoffice 6.0 无头,我正在尝试将 html 转换为 pdf。我的文档的html骨架是

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	</head>
	<body>
		<div>
			<span><img style="height:99px; width:760px;" src="https://mydomain/path-to-image.jpg" alt="Header" /></span>
		</div>
		
		<div style="display:block; width:760px;">
			<div style="display:inline-block;">
				<h2>my title</h2>
				<br/>
				my content ...
			</div>
		</div>
	</body>
</html>

Libreoffice 服务器是架构中的后端服务器,图像 URL 是前端正确的 URL(它有效),但 Libreoffice 不包含图像。

【问题讨论】:

    标签: html pdf libreoffice


    【解决方案1】:

    尝试将图像保存到本地。例如在桌面上,然后重试。

    【讨论】:

    • 我打印了 html 并尝试从安装 Libreoffice 的服务器获取该图像,但它不起作用。所以是服务器配置问题...
    猜你喜欢
    • 2015-08-01
    • 2023-01-31
    • 1970-01-01
    • 1970-01-01
    • 2013-02-22
    • 1970-01-01
    • 2016-01-14
    • 1970-01-01
    • 2022-10-17
    相关资源
    最近更新 更多