PDFBox change color of a line

放肆的年华 提交于 2019-12-23 22:22:01

问题


I work with pdfbox 1.8.5 and I try to draw a colored Line using PDPageContentStream.drawLine().

I tried it with PDPageContentStream.setNonStrokingColor( 255, 0, 0 ); but it doesn't work. I also didn´t find any examples or HowTos concerning Line Color.

Does anyone know, how I can change the Line Color?


回答1:


Try this method. It's working for me.

contentStream.setStrokingColor(229, 13, 209);


来源:https://stackoverflow.com/questions/23713959/pdfbox-change-color-of-a-line

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