How to change the color of text highlight
I'm trying to select and highlight certain text in the PDF. Here's my sample code. I want to change the color of the highlighted text. Something similar to what the Highlight Text tool does in acrobat....
View ArticleRe: How to change the color of text highlight
I would recommend that you look at creating Highlight annotations instead.
View ArticleRe: How to change the color of text highlight
I'm not really sure what you mean by Highlight annotation? I know how to create regular annotations, but those are not exactly what my purpose. Can you point me to a sample code? Something like this...
View ArticleRe: How to change the color of text highlight
Look at the documentation for the PDPageAddNewAnnot() API. You will see that the third parameter is the type of annotation. Consult ISO 32000-1:2008, 12.5 on Annotations.
View ArticleRe: How to change the color of text highlight
Thanks, I found the code, but seems like Highlights not working. I saw one other user mentioned this. Not sure how to solve it. When I use Square, it creates a red box around my selection but when I...
View ArticleRe: How to change the color of text highlight
The Markup annotation requires a QuadPoints key. See 12.5.6.10.
View ArticleRe: How to change the color of text highlight
Thanks a lot for the answer. I look at the document, and still not sure where to put the QuadPoints.In this code segment, boundingRect gives those 4 corner points right? Or is there some other API...
View ArticleRe: How to change the color of text highlight
You will have to set these separately using the Cos layer (CosNewArray, CosNewFixed, CosArrayPut, CosDictPut are your main routines). Pay close attention to the definition of QuadPoints, it is not just...
View ArticleRe: How to change the color of text highlight
After suggestions, I did these changes to the code. I'm still not getting the highlight annotation. It seems like I'm doing something wrong at the last couple of lines from PDAnnotNotifyDidChange....
View Article"Attach a file as a comment" through code
We have to embed a set of HTML pages in a PDF file and create a link to those embedded files, so that the user can click on the link to view the HTML contents on a browser. We know this can be done by...
View ArticleRe: The plugin is gets called when we open any pdf document in internet explorer
Thanks for the response. But the method is calling before opening the document in an IE. So I cant check that AVDocIfExternal or not. Is there any other method, where can I find Acrobat is in IE or...
View ArticleRe: The plugin is gets called when we open any pdf document in internet explorer
I don't imagine Acrobat provides a method. Adobe don't expect you to do anything in Plugin initialisation except set up callbacks anyway. But you could try GetModuleFileName and do your own tests on...
View ArticleRe: "Attach a file as a comment" through code
Is this for a server process? (iTextSharp is NOT a language! And it is not an Adobe product)
View ArticleRe: How to change the color of text highlight
Thinks to think about 1. You are creating an annot in a CosObj. To add this to a page you'd use PDPageAnnAnnot. PDPageAddNewAnnot creates the CosObj itself.2. There may be other required keys in an...
View ArticleRe: How to change the color of text highlight
I guess I'm almost there, but getting an error saying invalid annotation object. Something wrong in the PDAnnotNotifyDidChange? Does that key suppose to be something else? CosObj cosDict =...
View ArticleRe: How to change the color of text highlight
1. I don't see where you put the annot into the current page.2. The atom on PDAnnotNotifyDidChange is still wrong, but will not cause an error (Highlight is a value, not a key).3. Did you check if...
View ArticleRe: How to change the color of text highlight
is there a Cos equivalent of PDPageAddAnnot(pdPage, -2, pdAnnot)?For highlights there's only Subtype and QuadPoints as required in ISO 32000-1:2008, 12.5 on Annotations. I'm not sure whether there's...
View ArticleRe: How to change the color of text highlight
You missed a required entry, because table 164 also applies. It makes no sense for Rect to be required as well as QuadPoints, but that is the rule. You can either add your Cos obj using the Cos API...
View ArticleRe: Does Acrobat have a Java API/SDK??
Hello Rajpalkulhari, Did you find a solution to your problem? I am actually wanted to do the same thing. I did tried to use pdfbox and itext, but I like the output of Adobe xml export better, just...
View ArticleRe: How to change the color of text highlight
Thanks a lot for the help so far. So I was successfully able to crate a highlight annotation from text selection. Here's my code, if anyone else get similar questions. Only one more question. in my...
View Article