Screen Tips/Pop-Up Text/mouse-over information in pdf

Please post any ideas or requests for new features here for the End User Version of PDF-XChange (printer Drivers)

Moderators: Tracker Support, TrackerSupp-Daniel, Sean - Tracker, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Tracker - Clarion Support, John - Tracker Supp, Ivan - Tracker Software, Tracker Supp-Stefan, moderators, Support Staff

Post Reply
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

In WORD, when you hover the mouse over a footnote reference, an information box appears with the contents of the footnote:
texttooltips.jpg
How do you get the same effect after converting from docx to pdf using PDF-XChange Editor
FOR EVERY footnote link (hint text should not have a character limit) ?

***
IDEA

Using Note, this is how it could also look like (Note icon BOTH sides of the footnote reference with the text of that footnote).

(It would be good to set the font size as in the bottom footnote).
lorem-note.jpg
Manually this can be done.

The question is how to do it AUTOMATICALLY for each footnote reference in the text.
(Maybe some javascript in a pdf editor as if it can't be done in PDF-XChange Editor?)

Interestingly NO software in the world for pdf - has this option.
Last edited by w323 on Fri Jul 05, 2024 10:54 am, edited 1 time in total.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 18407
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by Tracker Supp-Stefan »

Hello w323,

Welcome to our forums.
Are you doing the conversion from Word to PDF using our Editor (e.g. drag and drop of the word file), Word's tools or maybe our add-in that comes with the PDF-XChange Standard Printer and the full Pro bundle package?

I am not sure this is currently possible to automate, however can you please share with me one such sample page - so that I can have a look at what might be possible?

Kind regards,
Stefan
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

For conversion from docx to pdf I use plugin PDF-XChange Editor in WORD.

The ability to automatically add notes next to footnote references is rather impossible to do during docx-pdf conversion in Word using the add-in.
I suspect that it would be possible to do it somehow in bulk in the desktop version of PDF-XChange Editor (javascript?).

It would be important for the Note icon to be scalable when the page is enlarged and not obscure the text, and for the Note text itself to be written in the style and font size as in the footnote.

I attach a test docx file with footnotes.
Lorem Ipsum-hyperlink.pdf
(11.67 KiB) Downloaded 3 times
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

Using AI, I tried to "write" javascript myself, which adds bulk notes next to footnote references in the main text.
Unfortunately, my script had problems detecting the footnote references.
Detecting them by style - that is, a font with a "superscript" look - probably wouldn't have helped anyway, since sometimes symbols in mathematical formulas can look like that in the text.
And I know of no other way to detect such a footnote reference in the text.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9111
Joined: Wed Jan 03, 2018 6:52 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by TrackerSupp-Daniel »

Hello, w323

I am afraid that PDF simply does not have the capacity for such an action to be automated. In PDF, there is no direct relation of the content items. A link simply says "set view to page 5, at position x/y with zoom 200%", it does not know what content is there, or have any way of fetching that. Even if it did, identifying the relevant section would be nearly impossible.
In some cases, the paragraph may be split across two pages, in others, your footnote may be more than one paragraph long, and numerous other such troubles get in the way of offering it in this coordinate based and greatly "disconnected" format, where no two page content items have a direct relation, only coincidental or artificial relations.

Now, moving paste that, AI is notoriously bad at writing code, so I would never suggest it for such an endeavor to begin with, (it has a habit of thinking that multiple similar languages are related), and the JS which is usable in PDF is an even more specialized subset, which will not accept even some standard functions of normal JS. Beyond that, JS is unable to directly access base content in the file, so it would not likely be able to accomplish this even if the AI was smart enough to do it for you.

Finally, Link items in PDF can only display the information which details where they lead (such as "page 5") in the case of links inside the current document, this information:
image.png
image.png (10.94 KiB) Viewed 1026 times
Since the specification prohibits excess information, adding that in could damage the file, leading to data loss. It would not be possible to create single object which shows the text you want, and still operates as a link to jump to the footnote. Instead, you would need to manually copy the footnote text, and place a "sticky note" comment, or something similar near it, to hold that comment text for it.
PDFXEdit_m7mzelNdIw.gif
One issue with a sticky note specifically is that its icon size scales with zoom, so when you zoom out, this could be detrimental to the document:
image(1).png
Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

As far as I understood, the pdf simply does not contain the necessary information about the object. Everything is treated as text. In Word, individual elements have their own styles so you can easily identify individual parts of the text-in pdf you can't, and that's where the whole problem comes from.

IDEA.
That is, the only possibility would be to try to do it during WORD-PDF conversion.
Then we still have information about individual elements. We know where the footnote reference is in the main text and where the associated text is in the footnote. Such information could be saved somewhere to some database and used later when creating a Note. The problem is how to insert such saved information about the specific number of the footnote reference into the appropriate place in the pdf and in bulk.

(Instead of Note can use another object but scalable with the ability to show Screen Tips/Pop-Up Text/mouse-over information in pdf).
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

"(Instead of Note can use another object but scalable with the ability to show Screen Tips/Pop-Up Text/mouse-over information in pdf)."

As for scalability-you can use Stamp, for example.

Then when you enlarge the page, the icon retains its size.
You can upload your own images from disk as an icon.

The content of the footnote can be placed in the "red text" Stamp field.
In addition, you need to remember to set in the properties of the Stamp, "printing" to "NO".
It is also worth checking the lock log so that the content of the Stamp is not editable in the pdf.

The only 2 problems is that it does not retain the font properties as in the footnote (type, size, italics), but this could probably be improved in the new version of PDF-XChange Editor.
(Preservation of font properties is important for the appearance of footnotes to be in accordance with the APA standard)
And it can't be done automatically for every footnote reference in the main text-you have to do it manually.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9111
Joined: Wed Jan 03, 2018 6:52 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by TrackerSupp-Daniel »

Hello, w323

At that point, we get into changing the document content considerably. Converting from work is designed to retain the original content as much as possible, not add new items. Links will be preserves, and in the future, we will be trying to maintain footnote links as well as backlinks as well, where possible. Unfortunately, descriptions like word offers simply do not work in the PDF format, unless you wish to place a separate comment object nearby, without overlapping the link and making it unclickable.

I am afraid that this will not be possible in any automatic way, unless the spec changes their definitions for link objects and allows a description field.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

Having a docx file with numbered footnotes (I was able to extract and number them from the original docx file), perhaps it would be possible to insert stamps in bulk near footnote references in the main text, with the text of the stamps taken from the footnotes from the corresponding footnote number with style and font properties preserved - using PYTHON and the PyPDF2, pdfplumber, pdfminer.six and reportlab libraries.
Last edited by w323 on Fri Jul 05, 2024 11:01 am, edited 1 time in total.
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

Could you please fix the program and make the text in the pop-up window as well as in the STAMP to be the SAME as it is pasted? (yes I know, it is manually possible to change the text properties)
That is, it kept the style, size, color and other properties of the pasted text (font and paragraph).
1.jpg
2.jpg
I do not know why - manually after changing the font size to a larger one and add italic, in the saved file the font in the pop-up window when you hover the mouse changes, and in the stamp text window - when you click on the stamp icon - NO (it is microscopic).
3.jpg
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9111
Joined: Wed Jan 03, 2018 6:52 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by TrackerSupp-Daniel »

Hello, w323

Could I ask for a sample of the file you are using the with that comment popup after pasting content into it? In my tests, pasting content does not seem to have any discrepancy with the tooltip information, and I am curious to see if the same is present here, or if perhaps this is a side effect of display/resolution scaling in place on your device.

Also, I realize it has not been asked yet, but are you running the current latest build of our software (b.387)? If not, please do update and see if that helps to resolve this issue.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

Sorry for the confusion.
I didn't do enough tests.
Foxit Reader turned out to be the culprit, in other programs the font size agrees, although they show the font each differently.
Yes, I have the latest version.

Please fix so that the pasted text into the note/stamp field is like that - like the source text at once (and you don't have to tune it manually yourself) that is, keep indentation, line division, effects, shading, underlining, bold, color, font style, etc.
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

With the help of AI, I was able to "write" python code that inserts notes MANY TIMES AT A TIME next to footnote references in the main text of the footnote text pdf file. That is, at least in the case of notes, IT CAN BE DONE (although outside the program). Unfortunately, I don't know how to do it with stamps. But perhaps it can be done inside the PDF-XChange Editor program using javascript, python and having a ready-made docx file with numbered footnotes (which makes things easier). Ways to track where footnote references are in the main text are probably several. External methods besides the PDF-XChange Editor could create such a file with: the page number in the pdf where the footnote reference is in the main text, the xy coordinates of the footnote reference, and the footnote number (this would also make the matter of inserting the stamp easier).
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9111
Joined: Wed Jan 03, 2018 6:52 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by TrackerSupp-Daniel »

Hello, w323
w323 wrote: Fri Jul 05, 2024 6:04 pm Please fix so that the pasted text into the note/stamp field is like that - like the source text at once (and you don't have to tune it manually yourself) that is, keep indentation, line division, effects, shading, underlining, bold, color, font style, etc
Sorry but I don't understand what you are asking us to fix? When copy/pasting this from multiple sources (including MS Word) and pasting directly into a popup note, rich text elements do seem to be retained without issue:
image(1).png
image.png
The same works with Stamps, and all other comments that can have a popup for that matter. The only way pasting would not retain this information, would be if the location you copied it from did not perform a rich text copy action.

Regarding the footnote concept, as I have mentioned before PDF unfortunately does not work like this. We have to adhere to the Specification to ensure your documents are stable, and so that other apps can use them without corrupting your files leading to data loss.
Even something seemingly simple, like initially creating a mouseover preview on a footnote "link" would be impossible without making two separate objects at the same location. The issue with placing them at the same location is, either the link is on top, making it clickable as you need, or the comment is on top, allowing mouseover to work, but the link is hidden and cannot be clicked, you cannot have both at once...

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

In my case, after using the "Select Text" function (which most users probably choose by default), Copy and after pasting into the Notes or Stamp text box, the text looks different, it is stripped of all the properties of the original.
lorem.png
lorem2.png
If I use the option
-edit text
-select text with the mouse
-paste into the text field Notes
is a little better, but the copy is not 1:1
lorem3.png
************************************
I did not express myself precisely enough.
I have already done tests myself and I know that it is impossible to put two objects in the same position with their interaction/functionality when clicked or hovered with the mouse.

I don't want the Stamp icon in place of the footnote reference. The stamp icon should be BOTH sides (e.g., slightly to the right and at the top so as not to obscure the text).
lorem4.png
lorem4.png (9.87 KiB) Viewed 711 times
Since adding a single Stamp (with the footnote text pasted manually) BOTH sides of the footnote reference is possible (and the resulting file is not corrupted), I suspect that inserting such Stamps with the text MULTIPLE AND AUTOMATICALLY would be doable.
(perhaps with some actions/files that the user would have to perform manually or prepare some data files (e.g., file with numbered footnotes, xy footnote reference coordinates) outside the PDF-XChange Editor-if it could not be done otherwise)
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

He does not want to multiply threads so I will write here.

After adding to the text Polish characters, or diacritical marks: ą, ć, ę, ł, ń, ó, ś, ź, ż
znaki0.png
in the text box Note or Stamp - it is incorrectly displayed in most browsers (Opera, Edge, Brave, Chrome-Chromium browsers):
znaki1.png

Only Firefox displays the characters correctly.

For that, pdf programs display characters well.
I don't know what this is caused by or how to remedy it.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9111
Joined: Wed Jan 03, 2018 6:52 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by TrackerSupp-Daniel »

Hello, w323
w323 wrote: Sat Jul 06, 2024 6:28 am Since adding a single Stamp (with the footnote text pasted manually) BOTH sides of the footnote reference is possible (and the resulting file is not corrupted), I suspect that inserting such Stamps with the text MULTIPLE AND AUTOMATICALLY would be doable.
I see, I am not certain that it could be done, but I will check in with the team to see what their thoughts are.
w323 wrote: Sat Jul 06, 2024 6:33 pm After adding to the text Polish characters, or diacritical marks: ą, ć, ę, ł, ń, ó, ś, ź, ż
[image]
in the text box Note or Stamp - it is incorrectly displayed in most browsers (Opera, Edge, Brave, Chrome-Chromium browsers)
In this situation, it is very likely the issue is on the hand of those browsers. Seeing as Firefox, Adobe, and most other PDF handlers do render these items properly, I expect that the Chromium based browsers PDF handling simply does not know of these items or how to handle them properly. It could also be in relation to font availability, but I would assume you are doing these tests on the same device which applied the text, in which case, it should be present.

You will likely wan to contact Google, Microsoft, and such in relation to the issues their browsers have rendering these text items.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

I see, I am not certain that it could be done, but I will check in with the team to see what their thoughts are.
Having available (what I have):
-original docx file
-numbered footnotes in the docx file
-coordinates of each footnote in the main text
It can certainly be done.
*
The problem is inserting the formatted text of the footnotes to look like the original in the stamp text box.

I am just looking for some free python library to make this possible.

BTW :
The conversion from pdf to docx in PDF-XChange Editor is very poor. Adobe does it much better.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9111
Joined: Wed Jan 03, 2018 6:52 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by TrackerSupp-Daniel »

Hello, w323

The best I can offer is that if the team deems it possible and worthwhile, we will look into it, but I cannot many any promises.

As for the conversion, It is an area we are constantly working to improve, if you have an example that is particularly bad, please do feel free to email us with a few screenshots of where you see the largest issues, and copies of the original PDF and output Word file, so we can delve into the conversion logic and try to improve those areas. Our email address is Support@PDF-XChange.com

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

I have inserted my Stamp in pdf wholesale many times (python script), but in image form.
How do I select ALL such objects in the document and change their property such as opacity?

There is no "search and select similar elements" option in the program. (javascript?)
My objects do not have a separate identifier.

The only option I have found is to use:
Edit Objects-Images and select a square on a given page.

But this is problematic because:
-I can't select all the elements in the document
-selecting like this selects ALL the images in the document, even those that I don't want to change the properties of

The only solution is to select page by page, being careful not to select unnecessary other images.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9111
Joined: Wed Jan 03, 2018 6:52 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by TrackerSupp-Daniel »

Hello, w323

If the item is a "Stamp" type comment, than you can open the comment pane and organize the pane by content type, to select all stamps at once.
If the item is a base content image, then you can do the same in the Content pane, and right click to "select all > images" then scroll through the list and Ctrl+Click on images that you do not want affected by the operation.

I am afraid that as you say, there is no method to "select alike" images.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

Well, yes.
In the "Content" Panel, I can only select all Comments or Images, as well as Texts, Shapes, XForms.

BTW:
Please correct the document zoom option.

I only see the options
-vertical
-horizontal
2 sheets side by side
Make the zoom like in WORD.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9111
Joined: Wed Jan 03, 2018 6:52 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by TrackerSupp-Daniel »

Hello, w323

In the "content panel" you should not be able to select any comments (as those all appear in the "Comments" panel instead), but selecting base content images, shapes, and text would certainly be possible.

As for your zoom request, I I am not sure what you mean by correct. This is a standard for how to display PDF files, and I am not aware of any others that present the pages in a "tile view" like Ms Word does with their documents. PDF also has a defined set of options which the document itself can request, there are no options beyond 2 page mode in that respect, so offering this would be a bit strange.

If you wish to emulate that however, you can open the thumbnails pane (Ctrl_T), then expand it, and zoom in to get a large tiled experience, like this:
image.png
Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

Thank you for your response. Actually, in the Thumbnail Panel it is possible to get such a view - I overlooked it. Too bad there is no such option in the main zoom options. It's much more convenient sometimes than the scrolling version.
w323
User
Posts: 16
Joined: Mon Jul 01, 2024 3:09 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by w323 »

I finally managed to "write" thanks to AI a working python script that does what I wanted !!!
(it can also be converted to exe using Auto PY to EXE)).

The whole thing is quite complicated, but it works.

Needed:
-original docx file
-a file with numbered footnotes (I do this using a VBA macro) (sometimes some footnotes need to be corrected manually by removing unnecessary spaces or paragraph end marks)
-a file with the coordinates of each footnote (I do this using a VBA macro)
-file with a small stamp icon in png
-PYTHON code inserting a stamp icon above the footnote reference number in the main text AND the footnote text as Comments (invisible frame opacity 0%, blocked editing)

Sometimes some icons obscure the text, and you have to move them manually using PDF-XChange Editor (I move the icon, unblock it in Comment properties and move it to where the Stamp icon is and lock it again)

The whole thing works beautifully.

The disadvantage is that the content in the pop-up window when you hover over the Stamp image-doesn't retain the font and styles of the original footnote (but this is also the case in WORD). This can probably be fixed, but I haven't figured out how yet (you'd probably have to use another, perhaps paid library in python).
If anyone would like to print such a file with stamps-iconic stamps will be visible.
Another disadvantage is that-as I wrote earlier-all diacritical marks are missing in some languages (and cut long text) if you use Chromium engine based browsers to view such a pdf (In Firefox and pdf programs it shows OK).

But it's still a success for someone who doesn't have a clue about programming (although it can probably be done easier and better).
I haven't seen such a trick on the Internet yet ;)
w.jpg
a.jpg
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9111
Joined: Wed Jan 03, 2018 6:52 pm

Re: Screen Tips/Pop-Up Text/mouse-over information in pdf

Post by TrackerSupp-Daniel »

Hello, w323

I am glad to hear that you have found a solution which works for you. As before, if the Dev team see merit in this, than we may see some action in this direction, if not, than we likely will not see any changes here.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Post Reply