Thank you Tilman, that worked pretty good. I was trying to get the actual color name and I couldn't find it. By calling: + "\tstroking color=" + getGraphicsState().getStrokingColor().toRGB() + "\tnon stroking color=" + getGraphicsState().getNonStrokingColor().toRGB()
I am getting: stroking color=8421504 non stroking color=12632256 I didn't see any other method to get a color name. Is there a way to translate this into something more user readable/understandable? One more question, what is lineCap? Thank you, Ray -----Original Message----- From: Tilman Hausherr [mailto:thaush...@t-online.de] Sent: Tuesday, August 30, 2016 12:17 PM To: users@pdfbox.apache.org Subject: Re: Question on lines in PDFs Am 30.08.2016 um 16:26 schrieb Clark, Raymond C: > Thank you, that worked very nicely. I was able to pull out the x, y, width, > and height of the lines in my PDF. I didn't see a way to get the line color, > the line pattern, or the fill color if it is a rectangle from this code. Did > I miss it someplace? (We only have lines and rectangles in our PDFs) You can get these with getGraphicsState().getStrokingColor() getGraphicsState().getNonStrokingColor() getGraphicsState().getLineDashPattern() getGraphicsState().getLineCap() etc Tilman > > Thank You, > Ray > > -----Original Message----- > From: Tilman Hausherr [mailto:thaush...@t-online.de] > Sent: Monday, August 29, 2016 3:43 PM > To: users@pdfbox.apache.org > Subject: Re: Question on lines in PDFs > > Am 29.08.2016 um 22:40 schrieb Clark, Raymond C: >> Is there a way to pull out information on lines and rectangles from a PDF >> using PDFBox? > Here's some code for that: > > http://stackoverflow.com/a/38933039/535646 > > Tilman > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org > For additional commands, e-mail: users-h...@pdfbox.apache.org > > > ________________________________ > > CONFIDENTIALITY NOTICE: This e-mail and any files transmitted with it are > intended solely for the use of the individual or entity to whom they are > addressed and may contain confidential and privileged information protected > by law. If you received this e-mail in error, any review, use, dissemination, > distribution, or copying of the e-mail is strictly prohibited. Please notify > the sender immediately by return e-mail and delete all copies from your > system. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org > For additional commands, e-mail: users-h...@pdfbox.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org