A way to tell if a sticky note has text in it

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

329
User
Posts: 75
Joined: Fri Jun 30, 2023 6:28 pm

A way to tell if a sticky note has text in it

Post by 329 »

I use the different colors and shapes (icons) of sticky notes to indicate certain meaning to the text next to it (red for urgency etc). But there is no way to tell if a sticky note actually has text in it (I occasionally insert text in the sticky note). I have to hover to tell. And this gets very difficult if you have tens or hundreds of sticky notes.

How about adding a small circle or balloon (or anything really) to the corner of the sticky note icon that signifies text inside?
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: A way to tell if a sticky note has text in it

Post by Stefan - PDF-XChange »

Hello 329,

I presume that having the pop-ups for sticky notes that do have text in them open is not the option you are looking for?
Otherwise you can have it like this:
image.png
Another alternative I can think of is to open the comments pane, and then order sticky notes by e.g. page (I hope you do not have hundreds of sticky notes on the same page ;) ), and then those that do have text in them - will display it in the comments pane:
image(1).png
Kind regards,
Stefan
You do not have the required permissions to view the files attached to this post.
329
User
Posts: 75
Joined: Fri Jun 30, 2023 6:28 pm

Re: A way to tell if a sticky note has text in it

Post by 329 »

Thanks for replying.
I presume that having the pop-ups for sticky notes that do have text in them open is not the option you are looking for?
This still means I have to interact with each note individually. This takes a lot of time.


Another alternative I can think of is to open the comments pane
This is a fair but partial solution. I was hoping I could tell just by looking without having to switch panes or scroll etc. Here is a screenshot from another program (the top folder has notes, while the bottom one doesn't).
another.png
You do not have the required permissions to view the files attached to this post.
329
User
Posts: 75
Joined: Fri Jun 30, 2023 6:28 pm

Re: A way to tell if a sticky note has text in it

Post by 329 »

Also, like this :wink:
3.png
You do not have the required permissions to view the files attached to this post.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: A way to tell if a sticky note has text in it

Post by Stefan - PDF-XChange »

Hello 329,

The pop-up window for a sticky note that does have content inside should remain open or closed when you save the file and changes to it. So that would be a "permanent" solution once the pop-up is opened.

As for checking whether some annotations have content, while others do not - I did this simple JS:

Code: Select all

var annots = this.getAnnots();
for (var i = 0; i < annots.length; i++ )
{
  if (annots[i].contents != '' ){
    console.println("Annotation " + (i+1) + " has text inside: " + annots[i].contents);
    annots[i].popupOpen = true;
  }
}
Just add it to the JS console (Ctrl + J to open it), and then hit the run button:
image.png


Any annotation that has text added to it will have it's pop-up turned on, and also the text of that pop-up would be summarized in the console output. If you do not want the console output - just put // at the start of the 5th line or remove that line completely:

image(1).png

Kind regards,
Stefan
You do not have the required permissions to view the files attached to this post.
329
User
Posts: 75
Joined: Fri Jun 30, 2023 6:28 pm

Re: A way to tell if a sticky note has text in it

Post by 329 »

Thanks a lot for your detailed solution.

In my case, I resize the popup for easy readability of contained text. If I enable them all the time, I won't be able to read the PDF text behind them.

I know it feels like I am nitpicking but I am not. Promise! :oops:

PS It is great that PDF-XChange supports such features (JS).
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: A way to tell if a sticky note has text in it

Post by Stefan - PDF-XChange »

Hello 329,

Then you can maybe get the contents of those annotations in the JS console - so that you can quickly see those that do have any text in them.

You can also limit the pages for which you get the annotations:
var annots = this.getAnnots({
nPage:0, //this is the first page of the document - counting starts from zero
});

You can customize that JS further so that it suits your needs.

Kind regards,
Stefan
329
User
Posts: 75
Joined: Fri Jun 30, 2023 6:28 pm

Re: A way to tell if a sticky note has text in it

Post by 329 »

Insists on "undefined" :?

Also, as I understand, running that seems like even more effort than hovering with the cursor or opening and scrolling through the comments pane!

I think my suggestion is easy for the user and shouldn't be too hard to implement!

Thank you
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: A way to tell if a sticky note has text in it

Post by Stefan - PDF-XChange »

Hello 329,

You were asking for a way to figure out ALL the annotations where you've added text.
Hovering over them with the mouse is one annotation at a time.

Maybe I am not understanding the request fully - can you please share with us a sample file and some screenshots of what you want to achieve?

Kind regards,
Stefan
329
User
Posts: 75
Joined: Fri Jun 30, 2023 6:28 pm

Re: A way to tell if a sticky note has text in it

Post by 329 »

Not all at the same time, but as I read the document.
  • The document has hundreds of pages.
  • There are a few sticky notes in every page.
  • Most of them don't contain text. These just serve to mark the PDF text next to them (e.g. this part is urgent).
  • Some of them contain text to comment on the PDF contents.
  • Currently, I hover over each sticky note to find out whether it has text. If it does, I often just read it in the hover balloon. I don't need to open the popup for every note.
  • I am looking for a simple way to tell which notes I should hover over or open as I read the document. It is an ongoing process.
If still not clear, please let me know.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: A way to tell if a sticky note has text in it

Post by Stefan - PDF-XChange »

Hello 329,

Ahh! I think I get it now.
Well - I'd recommend that you build up your system - and e.g. have the colour codes for the urgency, but then also use different types of icons when you need to have text in the sticky note, and another one when there's no text - that way you will know if there's text in the sticky.

Another alternative would be to not add text to your sticky notes at all, and use e.g. the "Insert text" annotation type where you need to have a comment:
image(2).png
That way you would know where to hover with your mouse as it would be an entirely separate annotation type that is distinct.
The annotation from my above screenshot is the "Insert Text" one:
image(1).png


Kind regards,
Stefan
You do not have the required permissions to view the files attached to this post.
329
User
Posts: 75
Joined: Fri Jun 30, 2023 6:28 pm

Re: A way to tell if a sticky note has text in it

Post by 329 »

Thanks Stefan.

I think I'll go with your suggestion. I would still like you to pass over my suggestion if possible.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: A way to tell if a sticky note has text in it

Post by Stefan - PDF-XChange »

Hello 329,

I will certainly pass it along for consideration, but I can't make any promises at this point!

Kind regards,
Stefan
329
User
Posts: 75
Joined: Fri Jun 30, 2023 6:28 pm

Re: A way to tell if a sticky note has text in it

Post by 329 »

I understand. Thanks.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11345
Joined: Wed Jan 03, 2018 6:52 pm

A way to tell if a sticky note has text in it

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
Support@pdf-xchange.com