[tool] Match (copy) markup properties

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

User avatar
Mathew
User
Posts: 834
Joined: Thu Jun 19, 2014 7:30 pm

[tool] Match (copy) markup properties

Post by Mathew »

[Edit] :roll: I didn't realize there was already a built-in tool that does much of this - not sure when it was added (at least since v9.5 - maybe earlier) but I missed it for sure! From the right click context menu, Style Tools > Copy Comment Style
image(3).png
Even though there's a built-in method, I find myself mostly using this tool because I can set the specific properties to copy.

This tool will match properties (colors, lineweights and styles, etc) from the selected markup (annotation) to the next selected annotation. It can copy properties between markups in different documents. If you hold down Ctrl it opens a dialog to select which properties to copy. If you hold down shift, it will stay active and keep changing properties until the tool is selected again.


Installation
Extract the zip file and put into the Javascripts folder. Detailed instructions here viewtopic.php?p=196006#p196006
matchProps v1.2.zip

Usage
When PXCE is restarted, it adds a button to the Add-on Tools:
image.png
Select the tool with one markup (annotation) selected; then select another markup to transfer the properties to the second markup.

If Ctrl key is held down when selecting the tool, it opens an options dialog:
image(1).png
If Shift key is held down, the tool stays active (similar to selecting "Keep Selected" for built-in tools). The button will stay highlighted while the tool is active.
image(2).png
Select the tool button again to cancel; or close the dialog box that opens in the lower right corner of the screen:
image(4).png
Animation with Ctrl held down when picking the tool:
match properties.gif

This tool is translatable with 1ang.js. Translation strings:

Code: Select all

# Translation file (requires 1ang v1.0 or later)
# Domain for this translation file is "matchProp"
# Filename must be "translationData.matchProp.json" and saved in the JavaScripts folder

# It is not necessary for all strings to be included in every language,
#   but don't put an empty string "" for the translation, because that's what will be shown!
# This must be formatted as a JSON file except that:
#   lines starting with # and empty lines are stripped out before processing

# "Language" is three letter code as output from app.language
# "Original Text" is case sensitive!
#   Notice that the last item in a list does not allow a comma after it.
# Format:
#  "Language 1": {
#    "Original Text": "Translated Text in Language 1",
#    "Original Text 2": ["Translated Text 2 singular", "Translated Text 2 plural"]
#   },
#  "Language 2": {
#    "Original Text": "Translated Text in Language 2"
#   }

{
 "": {
     "Match properties of selected annotation.\nHold down Ctrl for settings. Hold down Shift to keep tool selected.": "",
     "Match Properties": "",
     "Keep Match Properties tool selected.": "",
     "Text properties": "",
     "Border Color": "",
     "Border Style": "",
     "Fill Color": "",
     "Opacity": "",
     "Rotation": "",
     "Blend Mode": "",
     "Author Name": "",
     "Nothing selected to copy properties.": "",
     "Pick markup to set %1. Close this to stop.": ""
 }
}
Previous version
matchProps v0.1.zip
You do not have the required permissions to view the files attached to this post.
Last edited by Mathew on Sat Jun 20, 2026 2:32 am, edited 14 times in total.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12911
Joined: Wed Jan 03, 2018 6:52 pm

[tool] Match markup (annotation) properties

Post by Daniel - PDF-XChange »

:)
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]
DanA
User
Posts: 7
Joined: Fri Jul 11, 2025 5:43 am

Re: [tool] Match (copy) markup properties

Post by DanA »

Matthew,

Very nice tool! Thank you for sharing. It makes copying properties so much easier. My only request would be for the ESC key to allow for cancelling the SHIFT repeat mode instead of having to hit the button again.

Dan
User avatar
Mathew
User
Posts: 834
Joined: Thu Jun 19, 2014 7:30 pm

Re: [tool] Match (copy) markup properties

Post by Mathew »

Thank you. I can think of a way to cancel with ESC. Will try
User avatar
Sean - PDF-XChange
Site Admin
Posts: 1085
Joined: Wed Sep 14, 2016 5:42 pm

Re: [tool] Match (copy) markup properties

Post by Sean - PDF-XChange »

Thanks Mathew,

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
User avatar
Mathew
User
Posts: 834
Joined: Thu Jun 19, 2014 7:30 pm

Re: [tool] Match (copy) markup properties

Post by Mathew »

[Edit May 20, 2026] Some minor changes and bug fix to the tool, so I'm not making a new post about it:
matchProps v1.1.zip
Changes in v1.1
  • fix setting fill color for line dimensions and arrows;
  • make translatable with 1ang.js.


OK, I made some revisions to the tool. I could not make the ESC key work, but it opens a progress dialog at the bottom of the screen that one can close to cancel the tool. I think this is a bit more intuitive. I also added the options to copy Rotation and Blend Mode.
image.png
matchProps v1.0.1.zip
Changes in v1.0.1
  • slight icon change;
  • show thermometer so that tool can be cancelled by closing thermometer;
  • add rotation & blendMode;
  • save last setting for "keep selected";
  • code cleanup;
  • show which properties are changing;
  • save setting for blendMode;
  • allow copying between documents
You do not have the required permissions to view the files attached to this post.
Last edited by Mathew on Wed May 20, 2026 11:22 pm, edited 2 times in total.
User avatar
Sean - PDF-XChange
Site Admin
Posts: 1085
Joined: Wed Sep 14, 2016 5:42 pm

Re: [tool] Match (copy) markup properties

Post by Sean - PDF-XChange »

Hi Mathew,

Okay, that's great - thanks for that.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
User avatar
Mathew
User
Posts: 834
Joined: Thu Jun 19, 2014 7:30 pm

Re: [tool] Match (copy) markup properties

Post by Mathew »

I added the option to match layer (OCG) and it now shows what the property values are in options dialog.
matchProps v1.2.zip
Changes in v1.2
  • option to match OCG;
  • show currently selected values in option dialog (if xutil.ClrUtx is installed, will give a color name, otherwise hexadecimal)
You do not have the required permissions to view the files attached to this post.