本文介绍了PDFBox更改线条颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用pdfbox 1.8.5,尝试使用PDPageContentStream.drawLine()
绘制彩色线条.
I work with pdfbox 1.8.5 and I try to draw a colored Line using PDPageContentStream.drawLine()
.
我用PDPageContentStream.setNonStrokingColor( 255, 0, 0 );
尝试了一下,但是没有用.我也没有找到有关线条颜色的任何示例或方法.
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?
推荐答案
尝试此方法.它对我有用.
Try this method. It's working for me.
contentStream.setStrokingColor(229, 13, 209);
这篇关于PDFBox更改线条颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!