How to change the highlight color for text
I am trying to select and highlight some text in the PDF file. Here is my sample code. I want to change the color of the highlighted text. Something similar to what the tool select text in acrobat.
Hilite HiliteEntry;
Hilite.Offset = 10; Highlight the tenth Word
AVDoc currentAVDoc = AVAppGetActiveDoc();
CurrentPDDoc PDDoc = AVDocGetPDDoc (currentAVDoc);
AVPageView currentPageView = AVDocGetPageView (currentAVDoc);
ASInt32 pageNum = AVPageViewGetPageNum (currentPageView);
Red PDColorValueRec;
Red.Space = PDDeviceRGB;
Red.Value [0] = ASInt32ToFixed (1);
Red.Value [1] = 0;
Red.Value [2] = 0;
Highlight
AVPageViewSetColor (currentPageView, & red);
PDPage pdPage = PDDocAcquirePage (currentPDDoc, pageNum);
PDTextSelect textSelection = PDTextSelectCreateWordHilite (pdPage, & hilite, 1);
AVDocSetSelection (currentAVDoc, ASAtomFromString ("Text"),(void *) textSelection, true);
AVPageViewDrawNow (currentPageView);
AVDocShowSelection (currentAVDoc);
PDPageRelease (pdPage);
If this is not possible, at least can I change the font color or underline text?
Appreciate any help!
Thanks a lot for the help so far. So, I was successfully able to create a text selection highlight annotation. Here is my code, if someone else have similar questions.
More a question. in my highlight annotation, I get two rounded half-circles to the left and the right. Don't know why?
Hilite HiliteEntry; | ||
Hilite.Offset = 50; Highlight the 50th start of word | ||
AVDoc currentAVDoc = AVAppGetActiveDoc(); | ||
CurrentPDDoc PDDoc = AVDocGetPDDoc (currentAVDoc); | ||
AVPageView currentPageView = AVDocGetPageView (currentAVDoc); | ||
ASInt32 pageNum = AVPageViewGetPageNum (currentPageView); | ||
PDEElement pdeElement; | ||
ASFixedRect boundingRect. | ||
PDPage pdPage = PDDocAcquirePage (currentPDDoc, pageNum); | ||
PDAnnot pdAnnot. | ||
Red PDColorValueRec; | |
Red.Space = PDDeviceRGB; | |
Red.Value [0] = ASInt32ToFixed (1); | |
Red.Value [1] = 0; | |
Red.Value [2] = 0; |
Highlight | |
AVPageViewSetColor(currentPageView, &red);) | |
PDTextSelect textSelection = PDTextSelectCreateWordHilite (pdPage, & hilite, 1); | |
AVDocSetSelection (currentAVDoc, ASAtomFromString ("Text"),(void *) textSelection, true); | |
AVPageViewDrawNow (currentPageView); | |
AVDocShowSelection (currentAVDoc); | |
make the selection of text and get the bbox of the selection. | |
PDTextSelect selectedText = static_cast |
|
PDTextSelectGetBoundingRect (selectedText, & boundingRect); | |
the bbox allows to create an annotation, click QuadPoints | |
CosObj ArrayObj, RecObj; | |
CosDoc cd = PDDocGetCosDoc (currentPDDoc); | |
CosObj cosPage = PDPageGetCosObj (pdPage); | |
ArrayObj = CosNewArray (cd, false, 8); | |
CosArrayPut (ArrayObj, 0, CosNewFixed (cd, false, boundingRect.right)); | |
CosArrayPut (ArrayObj, 1, CosNewFixed (cd, false, boundingRect.bottom)); | |
CosArrayPut (ArrayObj, 2, CosNewFixed (cd, false, boundingRect.left)); | |
CosArrayPut (ArrayObj, 3, CosNewFixed (cd, false, boundingRect.bottom)); | |
CosArrayPut (ArrayObj, 4, CosNewFixed (cd, false, boundingRect.right)); | |
CosArrayPut (ArrayObj, 5, CosNewFixed (cd, false, boundingRect.top)); | |
CosArrayPut (ArrayObj, 6, CosNewFixed (cd, false, boundingRect.left)); | |
CosArrayPut (ArrayObj, 7, CosNewFixed (cd, false, boundingRect.top)); | |
for the Rect. |
CosObj cosDict = CosNewDict (cd, true, 4); | ||
CosDictPutKeyString (cosDict, "Subtype", CosNewNameFromString (cd, false, "Highlight")); | ||
CosDictPutKeyString (cosDict, "QuadPoints", ArrayObj); | ||
CosDictPutKeyString (cosDict, 'Rect', RecObj); | ||
pdAnnot = PDAnnotFromCosObj (cosDict); | ||
PDPageAddAnnot(pdPage,-2,pdAnnot); | ||
PDPageNotifyContentsDidChange (pdPage); | ||
PDAnnotSetColor(pdAnnot, &red);) | ||
AVPageViewDrawNow (currentPageView); | ||
PDPageRelease (pdPage); |
Tags: Acrobat
Similar Questions
-
How to change the highlight color for windows 7 (select the file or folder)?
How to change the highlight color for windows 7 in the aero theme (select the file or folder)?
You can change the font size because it is not a widget. To do this:
1 type dpi in your Start menu search box, and then choose make text and other more or less important.2 - Choose a size you prefer3 - Click on apply. -
How you change the highlight color for the active layer in the layers panel?
How can you change the highlight color for the active layer in the layers panel BY 9?
Do you mean you want something other than the darker gray (windows) or blue (mac)? Sorry, no can do, if that's what you hear.
-
Change the highlight color for text in Spark TextInput
Hello
As the title says, someone knows how to change the highlight color in a TextInput spark? By the "highlight color" I mean that some of the text is selected if the background color of the selected text.
Thank you.
SetStyle ("focusedTextSelectionColor",...)
There are also unfocusedTextSelectionColor and inactiveTextSelectionColor
styles.
-
How to change the highlight color for the bookmark icon?
Could someone help with this question? See the attachment for clarification. Our company creates thousands of medical documents that require bookmarks to navigate documents and show where the spectator is when you scroll the document. It sounds simple, but in my opinion, there is not a function to help change the game of bookmark highlight colors. Suggestions anyone? Thank you.
Right-click on a climax. Select properties from the menu drop down. Change the color, and then click the checkbox to make these properties by default.
-
How to change the highlight color, click the button image and text and sound. are there packages of buttons for use in my project?
Hello
Even if the point of things based Web links buttons created using them is of simple images. Captivate uses simple images. If you need to put your creative hat and not to let the fact that you see the word 'web' scared you somehow. An image is an image. Use on the web, use Captivate. Same case!
If you change the properties of the button, you can activate the legend of success. Fix any sound that you like with the legend of success and it will play when you click the button. If you do not want to see the legend of success, delete the text and configure it as transparent.
See you soon... Rick
Useful and practical links
-
version of Acrobat reader dc 2015: how to change the highlight color?
How to change the color of highlight (in dc 2015 of adobe acrobat reader version)?
Hi Herwig,
Highlight Select tool, press CTRL + E, Properties window will open, you can change the highlight color for here.
Kind regards
Rahul -
How can I change the highlight color for my PDF file?
On my PDF files, I am able to highlight text, but does not know how to change the color of the highlight. I got Adobe Reader and also paid upgrade - but honestly, I don't know what program I have. This is more confusing application, that I have ever used!
Hi vickis,.
You may need to go to the comment pane and right-click on the annotation "Highlight text" and choose "Properties of the tool by default".
The highlighter tool properties dialog box opens from which you can change the highlight color.
Kind regards
Ana Maria
-
How to change the background color for the text TreeField?
Hello
I call graphics.setBackgroundColor () of in the drawTreeItem() method, but it does not affect the background color of the graphics.drawText () method. Any ideas on how I can change the background color of text?
Thank you
I got this works using Graphics.drawFilledPath () to draw in a rectangle of background color before drawing the text.
-
How to change the highlight color 'find '.
I use Dreamweaver CS4 and when I use the 'Search' function to search for something in the source code it highlights the text found with a very light gray background (background color for source code is white). Is it possible to change the highlight color gray to something else that I often struggle to locate in the source code window, which has been found. I would like to make a lighter color is no longer perceptible. I searched through all of the preference settings and can't seem to find a setting for this. Is this one?
Thanks for the help!
Tom
I'm sorry, I think that you post in the wrong forum.
The issue in this case relates to the color used by Dreamweaver to highlight the code after using the built in find & replace tool.
In Dreamweaver CC 2015, the code highlighting color is editable by the user under Edit > Preferences > Code coloring > background selection
-
How to change the default color for tables/pivot tables
Can someone share how to change the default font color or background for tables and PivotTables? In my view, there is a CSS or XML setting I need to change.
It is difficult to read the text when negative numbers are RED and the overall totals have a default NAVY background fill. I'm trying to find out how to change the color of these without doing it manually to each report.
Thank you.Jin
For pivot Table
Go to OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res\s_oracle10\b_mozilla_4\views.css
Change the PivotTable section code
For table veiw
Go to OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res\s_oracle10\b_mozilla_4\views.css
Change the section of the Table
PS:take backup your original file before you edit any css file. Don't forget to give the points/close the thread
Thank you
saichand.v -
How to change the background color for message
Hi all
Forms how can 10G I change the background color in the message box. ?
I mean when I give a message like:-MESSAGE('HELLO'); then he comes in a window pop up.
I want to change the color background back popup window.
Published by: LuKKa Sep 22, 2010 15:36Create alerts using Navigator of the form object.
Set the title and the message you have requested (or set the message on the duration of SET_ALERT_PROPERTY)
To view your message, create a procedure like that...PROCEDURE MSGBOX(pMessage IN VARCHAR2) IS vAlert NUMBER; BEGIN SET_ALERT_PROPERTY('ALERT_NAME',ALERT_MESSAGE_TEXT,pMessage); vAlert:=SHOW_ALERT('ALERT_NAME'); END;
Now in your code, use like that...
MSGBOX('Your message goes here...');
-Clément
-
How to change the default color for the text label
Hello friend
I have a question, Z10 Simulator has the default theme of the white background & Q10 thoroughly black theme, if I put a white background of the page, & txt for the label by default color is black on Z10 is good, but the same page on Simulator of Q10 has cause there default label text color is light (white grey) which is not visible.
It is a way to set the color of the default text of all labels in an application.
Thanks in advance
I think the best way is to use the same theme in both the model Z10 and bright theme Q10 or dark theme.
for this add-in
the light theme or
theme dark in your file descriptor-bar.
-
How can I change the background color for the bar 'help file edit view history bookmark tools' in Firefox 29,0
You can add a theme of solid color to change the color of the top of the browser window, which contains the Menu bar.
-
How to change the background color of the window?
I would like to change the background color for all applications to pale gray,
such as Notepad and IE.
Anyone have any suggestions on how to do it?
Thanks in advance for your suggestionsRight-click on a zone empty of your desktop and choose personalize. When customization of the control panel applet opens, choose the color of the window (on the axis, below the pane). When the pane of the window color and appearance opens, click Advanced appearance settings (lower left corner of the pane).
Now... with the Windows color and appearance of dialog box open, click on the white space of the Window Active (do not click the text in the window) or choose the command window of the point: in the drop-down list. Choose a color for 1 color:, e.g. Gray. Click apply at the bottom right and wait Windows 7 resets the graphic properties.
If you now open Notepad, you'll have a gray window active. My IE follows suit, but only on a white page. Web designers in general choose the background image or color they want to view, and you will have to go into the options of the browser to replace those.
Maybe you are looking for
-
How can I import maps-v as a distinct group?
I don't want to infect my Contacts with imported cards in alphabetical order with the rest. I need a way to import as a distinct group. Thanks for your help. Tom
-
Tree control mode: Returns a validation event when the NORMAL value
CVI 2013: I am writing a software to change the command tree modes based on the user's selection. I noticed that when the command is set to NORMAL, I got a "EVENT_COMMIT". Just for reference, I am using a custom control - group of Radio buttons, but
-
inactive when connecting the mouse
AT THE START OF MY LAPTOP WITH XP I GO AS FAR AS THE MICROSOFT XP WELCOME SCREEN WITH LOG IN BOX AND USER NAME WITH THE MOUSE POINTER IN THE CENTER OF THE SCREEN AND A COMMAND CLICK ON THE USERS NAME, THE CUSTOM OF MOUSE WERK -.HELP WOULD BE APPRECIA
-
I need to know how to uninstall windows 98 Second edition
-
How to fix the family name is spelled on computer
I use Windows 7, when I get an email my name is spelled wrong, how do I fix?