Dieser Code-Schnipsel:
var style = new StyleSheet();
style.LoadTagStyle("body", "size", "6.6pt");
war eine schlechte Version CSS zu den HTML-Code der Anwendung Sie wurden Parsen.
Wenn Sie XML Worker verwenden, können Sie echtes CSS verwenden.
Gehen Sie auf der offiziellen Website und werfen Sie einen genaueren Blick auf die examples, wo wir CSS haben, wie:
<table style="font-size:10pt">
Html: table10.html; Java: ParseHtmlTable10.java; PDF: html_table_10.pdf
oder CSS wie:
p { font-size: 11px; font-family: "verdana", tahoma, arial, sans-serif; color: #040404; background-color: #FFFFEE; margin-top: 5px; margin-bottom: 8px; margin-left: 10px; }
h1 { font-size: 17px; color: #FFA500; margin-bottom: 10px; background-color: #0000EE; padding-top:6px; padding-bottom:7px; padding-left:10px; }
h2 { font-size: 15px; color: #0055AA; margin-bottom: 10px; margin-top: 16px; background-color:#FFCC66; padding-top:0px; padding-bottom:2px; padding-left:10px; }
h3 { font-size: 15px; color: #660000; margin-bottom: 8px; margin-top: 15px; }
h4 { font-size: 12px; color: black; margin-bottom: 8px; margin-top: 15px; margin-left: 8px; font-style: normal; }
code { font-size: 12px; margin-left: 16px; padding-left:16px}
HTML: paragj.html; Java: ParseHtmlTable6.java; PDF: html_table_6.pdf
Vielen Dank @Bruno ... –
@UMAMAHESH Wenn es funktioniert, bitte akzeptieren Sie die Antwort. –
ok Sicher Bruno ... –