2017-07-10 2 views
0

der Pdfreactor-Server gilt nicht text-indent und line-height Eigenschaft des Textbereichs. Wie repariert werden?Wie man `text-indent`,` line-height` Eigenschaften von Textarea auf das resultierende PDF Dokument anwendet?

<textarea style="height: 79px;width: 767px; text-indent: 63px; background-size: 100% 16px; line-height: 16px; left: 33px;top: 593px;font-size: 11px;font-family: Arial;background-image: none;background-color: white;color: black;"> This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a commentThis is a commentThis is a comment This is a comment This is a comment This is a commentThis is a commentThis is a comment This is a commentThis is a comment This is a comment This is a comment This is a commentThis is a commentThis is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a comment This is a commentThis is a comment This is a comment This is a comment This is a comment 123456789123 </textarea>

die folgenden Bilder die zeigen, wie es im Browser und PDF (nach konvertierte unter Verwendung PDFreactor)

1,0 enter image description here

oberes Bild (1.0) zeigen, wie es in Browser angezeigt macht.

2,0 enter image description here

über die (2.0) Bild zeigt, wie es nach dem in PDF konvertiert rendert mit PDFreactor

diese Bilder zeigt deutlich den text-indent und line-height Eigenschaft Textbereich nicht applyed beim Konvertieren des obigen HTML-Snippets. Irgendeine Lösung, um diese Eigenschaften von Textarea in pdfreactor zu rendern?

Antwort

0

Dies ist ein bekanntes Problem mit Textbereichen. Wenn jedoch die Interaktivität des Formularelements in der PDF-Datei nicht erforderlich ist, können Sie die Textbereiche als normale HTML-Elemente neu formatieren. Dies könnte so erfolgen:

textarea { 
    -ro-replacedelement: none; 
    display: block; 
    border: 1px solid black; 
} 

nun die Stile "line-height" und "text-indent" korrekt funktionieren.

+0

warum 'display: block; Grenze: 1px solid schwarz; Eigenschaften? – azad

+0

Der Stil "display: block" bewirkt, dass sich der Textbereich wie ein Absatz oder "div" -Element verhält, und der Stil "border: 1px solid black" dient nur dazu, die Grenze normaler Textbereiche nachzuahmen. Abhängig von Ihrem Anwendungsfall sollten Sie natürlich die Stile nach Bedarf anpassen. – realobjects

Verwandte Themen