gpt4 book ai didi

java - 将 html 页面更改为 .png

转载 作者:行者123 更新时间:2023-12-02 09:19:03 25 4
gpt4 key购买 nike

我想将从网站收到的 html 标签更改为 .png 图像。

这是我收到的 html:

    <html>

<body>
<div style='position: relative; margin-top: 25px; height: 800px;page-break-after: always;margin:0;padding:0;'>
<table style="font-family:arial;">
<tr>
<td width="0px">&nbsp;</td>
<td valign="top" width="626px">
<div style="position:absolute;">


<span style='left:356px;top:34px;position:absolute;'><img
src='data:image/gif;base64,R0lGODlhFABgAJEAAAAAAP///////wAAACH5BAEAAAIALAAAAAAUAGAAAAKKjI+py+0Po5y02ouz3rz7nwAiMJHXaEZphYJMK60UrGK0i9yPXI6l7cNxeAeUbsFLBXMKkzLUNDyhxaJRdpxdQ1dnFfmdRqVWIvkcE+XUP7S0i8aO4e46mLpj2rnszbK29/IVE2Dm8gchljio0iekYSiUJWgR2WD0WDZ5p2WJ55kZKjpKWmp66lIAADs%3D' /></span>


<span style='left:100px;top:0;position:absolute;font-size:12px;'><b>Responsible Delivery -
CO<sub>2</sub> Neutral</b></span>
<span style='left:196px;top:88px;position:absolute;font-size:8px;'>Sender</span>
<span style='left:196px;top:96px;position:absolute;font-size:8px;'>MY CONTACT</span>
<span style='left:196px;top:105px;position:absolute;font-size:8px;'>ROEBUCK LANE</span>
<span style='left:196px;top:114px;position:absolute;font-size:8px;'>SMETHWICK</span>
<span style='left:196px;top:123px;position:absolute;font-size:8px;'>BIRMINGHAM</span>
<span style='left:196px;top:132px;position:absolute;font-size:8px;'></span>
<span style='left:196px;top:141px;position:absolute;font-size:8px;'>B66 1BY</span>
<span style='left:242px;top:145px;position:absolute;font-size:8px;'>Phone:0121 500 2500</span>
<span style='left:250px;top:88px;position:absolute;font-size:8px;'>Account:103092</span>

<span style='left:4px;top:19px;position:absolute;font-size:12px;'>USER NAME</span>
<span style='left:4px;top:30px;position:absolute;font-size:12px;'>ADDRESS LINE 1</span>
<span style='left:4px;top:41px;position:absolute;font-size:12px;'></span>
<span style='left:4px;top:52px;position:absolute;font-size:12px;'>CITY LONDON</span>
<span style='left:4px;top:63px;position:absolute;font-size:12px;'></span>
<span style='left:4px;top:74px;position:absolute;font-size:12px;'>ZIP 123</span>
<span style='left:90px;top:74px;position:absolute;font-size:12px;'>United Kingdom</span>
<span style='left:220px;top:68px;position:absolute;font-size:18px;'></span>
<span style='left:4px;top:88px;position:absolute;font-size:8px;'>Contact</span>
<span style='left:4px;top:96px;position:absolute;font-size:8px;'>Phone</span>
<span style='left:4px;top:120px;position:absolute;font-size:8px;'>Consignment</span>
<span style='left:4px;top:128px;position:absolute;font-size:8px;'>Ref</span>
<span style='left:4px;top:104px;position:absolute;font-size:8px;'>Info</span>

<span style='left:60px;top:104px;font-size:8px;position:absolute;'></span>
<span style='left:60px;top:112px;font-size:8px;position:absolute;'></span>

<span style='left:60px;top:88px;position:absolute;font-size:8px;'>USER NAME</span>
<span style='left:60px;top:96px;position:absolute;font-size:8px;'>7420000000</span>
<span style='left:60px;top:120px;position:absolute;font-size:8px;'>3907367566</span>
<span style='left:60px;top:128px;position:absolute;font-size:8px;'>TESTORDERASM</span>
<span style='left:60px;top:136px;position:absolute;font-size:8px;'></span>
<span style='left:60px;top:144px;position:absolute;font-size:8px;'></span>

<span style='left:284px;top:18px;position:absolute;font-size:8px;'>Packages</span>
<span style='left:276px;top:48px;position:absolute;font-size:8px;'>Total Weight</span>
<span style='left:274px;top:26px;position:absolute;font-size:16px;'>1 of 1</span>
<span style='left:274px;top:56px;position:absolute;font-size:16px;'>2 kg</span>

<span style='left:6px;top:180px;position:absolute;font-size:8px;'>Track</span>
<span style='left:350px;top:180px;position:absolute;font-size:8px;'>Service</span>
<span style='left:5px;top:158px;position:absolute;font-size:22px;'>1550</span>
<span style='left:62px;top:160px;position:absolute;font-size:16px;'>3907 3675 66F</span>
<span
style='left:5px;width:370px;top:250px;position:absolute;font-size:10px;text-align:center;'>
25/10/19 08:23 Web 4.3.3-api </span>
<span style='left:19px;top:265px;position:absolute;'><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<span style='left:85px;top:363px;position:absolute;font-size:12px;'>BT48 7ER1 5503 9073 6756
6812 826U</span>
<span
style='left:132px;top:158px;width:250px;text-align:right;position:absolute;font-size:20px;'>
NEXT DAY</span>
<span style='left:130px;top:230px;position:absolute;font-size:14px;'> 812-GB - BT48 7ER </span>
<span style='left:10px;top:190px;position:absolute;font-size:18px;'></span>
<span style='left:10px;top:225px;position:absolute;font-size:30px;'></span>
<span style='left:300px;top:225px;position:absolute;font-size:30px;'>0087</span>
<span style='left:45px;top:180px;position:absolute;font-size:46px;'>GB-BT48 7ER</span>

<table
style='display:inline-block;border:3px solid black;padding:0;border-spacing:0;border-collapse:collapse;'
height='385' width='385px'>
<tr>
<td>
<table style='padding:0;border-spacing:0;border-collapse:collapse;' width='100%'>
<tr>
<td style='font-size:1px;border-bottom:1px solid black;' colspan='4'>
<div style='height:10px'>&nbsp;</div>
</td>
</tr>
<tr>
<td colspan='2'
style='text-align:left;border-bottom:1px solid black;vertical-align:top;'>
<div style='height:69px'>&nbsp;</div>
</td>
<td style='border-bottom:1px solid black;border-left:1px solid black;'>
&nbsp;</td>
<td style='border-bottom:3px solid black;border-left:1px solid black;'
rowspan='2'>&nbsp;</td>
</tr>
<tr>
<td style='border-bottom:3px solid black;'>
<div style='height:66px'>&nbsp;</div>
</td>
<td style='border-bottom:3px solid black;border-left:1px solid black;'
colspan='2'>&nbsp;</td>
</tr>
<tr>
<td style='text-align:left;vertical-align:top;' colspan='4'>
<div style='height:226px'>&nbsp;</div>
</td>
</tr>
<tr>
<td style='font-size:1px;' width='195px'>&nbsp;</td>
<td style='font-size:1px;' width='70px'>
<div style='height:1px'>&nbsp;</div>
</td>
<td style='font-size:1px;' width='80px'>&nbsp;</td>
<td style='font-size:1px;' width='40px'>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>

</div>
</td>
</tr>
</table>
</div>

我尝试了以下代码:

     HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
String uri = new File("D:/3907367566.html").toURI().toString();

try {
imageGenerator.loadHtml(new String(Files.readAllBytes(Paths.get("D:/3907367566.html"))));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
imageGenerator.setOrientation(ComponentOrientation.LEFT_TO_RIGHT);

imageGenerator.saveAsImage("D:/3907367566_2.png");
imageGenerator.saveAsHtmlWithMap("3907367566.html", "3907367566.png");

请检查原始 .html 页面的屏幕截图和我在此处获取的 .png 文件:https://drive.google.com/file/d/1VGgKwGkmSijKZWjhZADNLxCcBWOcY7f0/view?usp=sharing

谁能帮我创建一个与我们收到的 HTML 完全相同的图像?谢谢!

最佳答案

您的代码工作正常。问题是您没有下载 CSS 样式表和其他资源,例如图像(条形码)。

尽管 HTML 文件中嵌入了很多样式,但它显然丢失了一些样式规则。

一种解决方案是将所有 CSS 属性嵌入到 HTML 中。

另一种方法是使用外部 API,例如:https://htmlcsstoimage.com/它接受 CSS 和 HTML。

关于java - 将 html 页面更改为 .png,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58815627/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com