BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

pdf- export. comment-sticky-notes - offset. HOW TO AVOID

Started by hidden layer, October 16, 2018, 04:37:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hidden layer

Hi there,

for export to pdf I use Acrobat PDFMaker Add-On (some files in Add-Ins Directory).
One reason is that I can export layers, comments and so on for technical overviews with lots of Details.
In preferences I check in the function 'convert comments to Adobe PDF comments'.

While exporting visio-files to pdf the shapes with some content in shapesheet-miscellaneous-comment this Add-On creates the sticky notes for these comments (as a hint for additional Information).
When opening the pdf in full page view (100% zoom) these sticky notes have an offset to the shape they belong to. When zooming in the offset remains but will be reduced. (at 1600% zoom it's next to the shape.)

As a workaround I shift the pop-ups in pdf to its shapes and save it before spreading to others.

So the question is:
is it possible to avoid this offset?

I want to raise this question here before I mess around wit Javascript in Acrobat- maybe ist possible to shift all the sticky notes with one script- maybe not.

Thanks a lot for any advice.

oh- I forgot: Visio 2010 32-Bit, Acrobat PDFMaker 18 for Visio, Acrobat ProDC Version 18.11.20035.264147; Windows7 Version 6.1.7601


It is possible to create a new comment in pdf or access existing comments and read their properties directly from VBA. But Adobe does not let you change properties (position, content, type, etc.) of existing comments.

A workaround is to make a folder level javascript file, put a function in it and call that function from a VBA macro. I attached two files as an example. You need to put ShiftComment.js file to the javascripts folder in C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Javascripts and restart the Acrobat. Since you are using Acrobat DC, path to this folder may be different.

When you run VBA macro in visio file, it opens a file explorer for you to select a pdf file. Then it will ask the shift value. Then it will pass this value to the function in javascript file. Javascript function will read all the comments in the pdf and shift them to left or right based on the value you entered. Positive values will shift the comments to right and negative values to left. Note that for a 8.5 x 11 PDF page:
x-axis range is 0 - 612 pts
y-axis range is 0 - 792 pts
(1 inch = 72 pts)

Feel free to ask if you face any problems.

Tested on Visio 2013 Pro, Acrobat XI Standard on a Windows 7 64 Bit machine.

hidden layer

Hello metuemre
thank you for your explanation and effort.
I thought as much that it will be not that easy...

I've checked with a testfile but your proposal doesn't seem to work.

Maybe it's my fault but here is how I've done it.

The .js file is in "C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\Javascripts\"

I've executed the macro [Sub ShiftComments()], choose a testfile, entered 100 in the Inputbox (which should be definitive visible) but the appearance in Acrobat is the same.
In attachment you'll see how it appears in Acrobat at 105% zoom. The sticky note appears left above the red square (which contains the comment).

Any idea what went wrong?
I'm just wondering why the InputBox expects only a value (without axis x or y).



Hi Peter,

I thought you just wanted to shift the comments in x axis. I can add y axis as well. It will be easier to troubleshoot if you can provide a sample visio file. Did you get any error after execution of the macro?

hidden layer

Hi metuerme,
sorry for late reply- some circumstances...

I got no error message while executing the macro-  But I'm not sure if anything avoid the macro working. Thanks to admin rights I could store the macro in the dedicated Folder- so there was no visible blocking Point.
But as I told there was no shift of the bubble visible. I thought that a value of 100 would be definitive visible- am I wrong?

In Visio this works fine. I have A3-format with around 100 shapes- each with a comment and you can easily find to which shape a comment belongs to.
Exporting to pdf is (from my perspective) responsible for the Offset. After exporting the comment-bubbles seems to belong to another shape more above and more right. If you zoom in it gets better but this is very inconvenient.
If you open the pdf- you'll see how it Looks like. The visio is it's original.

The Thing to open the Point here was to find out if there is a solution already known.

Thanks for helping anyway!



Hi Peter,

I tried the macro on a different computer with Visio 2010 pro and Acrobat DC Pro and it still works. -17 for x and y axises shift comments on top of colored boxes perfectly.

Another option for you is to use Acrobat Action Wizard. First replace the ShiftComments.js file in App Folder with the attached one. Then go to Tools - Action Wizard - New Custom Command - Execute Javascript in Acrobat DC Pro. Then give a proper name to the label. After you click OK the Javascript Editor window opens, put "reposition(-17,-17)" in there without double quotes. Select "Don't show options, options are always the same". After you click OK, on the right pane, you will see your Command under Custom Commands. Each time you click that command will shift comments in the document. Note that this command will be accessible to every pdf document so you don't have to create it again.

Feel free to ask if you face any problems.

hidden layer

Hi Emre,
I'll try this on Monday.

Thanks so far- have a brilliant Weekend,

hidden layer

Hi Emre,
unfortunately it was another Monday - new laptop- new Problems...but after all I got it.

yes this works with the Action wizard.

after checking the functionality I figuerd out that the 1st value have to be positive to move the comments left (and the second remains negative to move them down)... anyway- it works!
Also I let the Checkbox deselected to move them succesively to the optimal Position.

So thanks again for this and the Patience


Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 256 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1102KB.
Tokens: post-login.
Cache hits: 13: 0.00126s for 26,767 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]