c# - itextsharp output string with multiple rows -
this reference pdf trying replicate.
http://www.depo.com.tw/asp/pdf/r_vw_pasat_2.pdf
i working on pdf catalog , trying output red-text area.
as guys can see in pdf, outputting letters 441-11b2-ldhem straightforward. however, outputting 441-11a7-ld/rd-em1 not.
private void placechunck(string text, int x, int y) { pdfcontentbyte cb = writer.directcontent; cb.savestate(); cb.begintext(); cb.movetext(x, y); cb.showtext(text); cb.endtext(); cb.restorestate(); }
all can think of place chunk @ corresponding areas. length process , requires calculation of charaters...
i wondering if know how in easier way? thanks.
ok, understand question.
the best way this, create small pdftemplate
object, , add ld , rd @ correct place (one above other). wrap pdftemplate
inside image
object, , wrap image
inside chunk
(maybe y offset). can create phrase
"441-11a7-", followed image chunk, followed "-em1". unfortunately, that's simplest way know.
another way use chunk
settextrise()
, you'd have find way return number of characters. while may possible, it's more difficult , more error-prone.
finally, writing custom implementation of drawinterface or verticalmark work, i'd need more time write such example (time don't have; i'm @ iso committee pdf in vienna moment).
maybe can show you've tried far?
Comments
Post a Comment