Using different fonts in PDF using iTextSharp and PDFStamper

南笙酒味 提交于 2019-12-05 15:27:12

Not really, no. It'll only handle one font at a time. Out of curiosity what are you doing to get bad pdf output? I'd like to see your code.

Have a look at ColumnText instead. There are quite a few examples floating around and its well-covered in "iText in Action 2nd edition". All the samples from the book are available on line.

Thanks for your answer Mark, however I already solved the issue. There was a problem with my Content-Type header I use to tell the browser how large the PDF is. This caused the browser to stop downloading before the entire PDF was actually downloaded. When adding a new font, the PDF size would just exceed the size specified in the Content-Type header, thus resulting in a bad PDF. It's solved now, multiple fonts work just fine :-).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!