Skip to main content
Inspiring
September 29, 2025
Answered

Any way to sync zoom, viewpoint, page selected across multiple docs?

  • September 29, 2025
  • 3 replies
  • 1427 views

Is there any way, when you have multiple documents open, to 'sync' the view (page, zoom level, scroll bar position) across every doc? Has anyone come across a script that can do this, or know of some other way to do it?

 

If I could 'retrieve' the horizontal and vertical scroll bar positions somehow I could probably write a keyboard maestro macro that would do it.

Correct answer 琥珀 猫太郎

This looks great but I'm on Indesign Mac, I'm guessing there's no easy way to get this going on Mac too? (I suspect m1b is on MacOS too).


I've uploaded the Mac plugin to Git.

Plugins downloaded from the internet don't seem to work directly on Mac.
https://helpx.adobe.com/jp/indesign/kb/indesign-and-macos-catalina.html

Using the information above, please run the following command in Terminal:
sudo xattr -r -d com.apple.quarantine /Applications/Adobe\ Indesign\ 2019/Plug-ins/<plug-in-name>

Replace
2019
with
2025

Replace
<plug-in-name>
with
KohakuExtendScript.InDesignPlugin

We encountered an issue while building the Mac version, but Dirk Becker resolved it for us. Thank you.

3 replies

Inspiring
October 4, 2025

I'm currently studying the SDK.

// Get front layout view.
InterfacePtr<IControlView> iControlView_frontView(Utils<ILayoutUIUtils>()->QueryFrontView());
if (iControlView_frontView == nil) return;

// Get front document.
IDocument* iDocument_frontDocument = Utils<ILayoutUIUtils>()->GetFrontDocument();
if (iDocument_frontDocument == nil) return;

// Get IPanorama.
// Panorama handles the control of content position, scale, and scrolling within the view's display area.
InterfacePtr<IPanorama> iPanorama_frontView(iControlView_frontView, UseDefaultIID());
if (iPanorama_frontView == nil) return;

// Get the content-corrdinate location currently positioned at the top-left corner of the frame.
PMPoint frontView_topLeft = iPanorama_frontView->GetContentLocationAtFrameOrigin();

// Get scale factor.
PMReal xScale = iPanorama_frontView->GetXScaleFactor();
PMReal yScale = iPanorama_frontView->GetYScaleFactor();

// Get application interface.
// GetExecutionContextSession() returns a pointer to the ISession interface aggregated in the kSessionBoss.
InterfacePtr<IApplication> iApplication(GetExecutionContextSession()->QueryApplication());

// Get IDocumentList.
InterfacePtr<IDocumentList> iDocumentList(iApplication->QueryDocumentList());

for (int32 i = 0; i < iDocumentList->GetDocCount(); i++) {

	// Get IDocument.
	IDocument* iDocument = iDocumentList->GetNthDoc(i);
	if (iDocument_frontDocument == iDocument) continue;

	// Get IPresentationList.
	// Each document knows the windows that are open on it by means of the IPresentationList interface on kDocBoss.
	InterfacePtr<IPresentationList> iPresentationList(iDocument, UseDefaultIID());
	if (iPresentationList->size() == 0) continue;

	// Iterate through an IPresentationList.
	for (IPresentationList::iterator iter = iPresentationList->begin(); iter != iPresentationList->end(); ++iter) {
		if (*iter == nil) continue;

		// Galley or Story view
		if (Utils<IGalleyUtils>() && Utils<IGalleyUtils>()->InGalleyOrStory(*iter)) continue;

		// Get IPanelControlData.
		InterfacePtr<IPanelControlData> iPanelControlData(*iter, ::UseDefaultIID());
		if (iPanelControlData == nil) continue;

		// Get IControlView.
		// kLayoutWidgetBoss is a BOSS representing a layout view.
		IControlView* iControlView_layoutView = iPanelControlData->FindWidget(kLayoutWidgetBoss);
		if (iControlView_layoutView == nil) continue;

		// Get IPanorama.
		InterfacePtr<IPanorama> iPanorama_layoutView(iControlView_layoutView, UseDefaultIID());
		if (iPanorama_layoutView == nil) break;

		// Replace the current scale factors with new values.
		iPanorama_layoutView->ScalePanorama(xScale, yScale);

		// Scroll so that a given content-coordinate point ends up at the top-left corner of the view.
		iPanorama_layoutView->ScrollContentLocationToFrameOrigin(frontView_topLeft);

		// Completed.
		break;
	}
}

Next step: Make it scriptable.

MrZZYAuthor
Inspiring
October 5, 2025

Hi 琥珀さん,
I don't really understand the level of detail here or what you have done, but I'd love to see the outcome if you manage to turn it into something scriptable that you can share. I looked into it on AI and it seems that perhaps you're writing a plugin that extends what InDesign can do. Given what others have said about InDesign not having the ability to deliver the type of 'viewport' specifics I stated in my initial post, your attempting this is a very exciting prospect. 

I'd love to hear more if you progress with this. 

Thanks again!

Inspiring
October 6, 2025

For now, I've made it scriptable and turned it into a plugin.

Windows, for the latest version of InDesign.

 

app.matchScrollZoomAllLayout();

 

Should work with this.

The method name is just a placeholder—let me know if you have any better suggestions.

 

GitHub URL

InDesignSDK_KohakuExtendScript_Plug-In 

 

Please extract the zip file and place it in the plugin folder.

Fred.L
Inspiring
October 3, 2025

Hey there,

 

I’m not certain if we can access all the points you’ve mentioned using Extendscript. While it’s definitely possible to achieve this through a plugin, it’s a more complex task. However, there are a few things we can consider here.

 

Jean-Claude Tremblay created a fantastic script that compares two documents. When both documents are opened, the palette (as shown in the attached picture) allows you to navigate and scroll simultaneously on both windows. This means he’s found a way to at least adjust the zoom and scrolling together. I’d say this is a promising start.

 

Here’s the link to his script:

https://payhip.com/b/iya3X

 

Hope it’ll help (at least a bit)

Fred

m1b
Community Expert
Community Expert
October 1, 2025

Hi @MrZZY this is something I have always wanted to do! Unfortunately, unlike Illustrator, we can't control the positioning of the viewport in Indesign. At least not directly.

 

However, a while back I came up with an approach which—while not ideal—is still very useful (to me at least).

 

See my Synchronize All Documents Text Selection script on my github repo. I use this frequently when I have multiple documents that all have matching "bones" eg. each document has the same basic subheads. To use it, select one of those matching subheadings and run the script.

 

Let me know if it helps in your situation.

- Mark

MrZZYAuthor
Inspiring
October 4, 2025

Thanks for this. Not quite what I was looking for, but very handy, I'll keep it in my scripts and see how much I use it, but certainly useful for some multiple similar-doc editing scenarios!