Hi,
Am 13.01.2012 21:02, schrieb Jean Bruno Souto Villete:
Hi Andreas.
Dear friend, I'm having problems to understand the work stream of pdfbox.
I saw the issue PDFBOX-582 <https://issues.apache.org/jira/browse/PDFBOX-582>
that says about "Ignoring text over images" and my problem is like discribed at
this issue.
Andreas, what I need is just simple.
I'll generate an pdf based at some image's width and put that image at the
generated pdf, plus I'll put some text that must be invisible but must be
selectable...
Can you send to me some code that explans any way to do that?
There is a cookbook available [1] containing a lot of simple examples. As
PDFBox doesn't support to set the Text rendering mode directly, you have to do
it on your own. According to the PDF specs (9.3.1) the operator "Tr" is used to
set the text rendering mode:
"Tr : Set the text rendering mode, T(mode), to render, which shall be an
integer. Initial value: 0."
You have to add the operator to the contentstream as raw command similar to the
sequence which can be found in PDPageContentStream#setLineCapStyle [2]
I'm sorry, I'm bother you...
But it's my unique resource to my short time...
Please don't contact the developers directly. You should join the mail list [3]
instead. I cc'ed my answer to the PSDFBox users mailing list.
From now on, thanks for your attemption...
--
Best regards.
Jean Bruno Souto Villete
Computer Science - A Java Man
+55 62 8230-2207
BR
Andreas Lehmkühler
[1] http://pdfbox.apache.org/userguide/cookbook.html
[2]
http://svn.apache.org/repos/asf/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/edit/PDPageContentStream.java
[3] http://pdfbox.apache.org/mail-lists.html