Quantcast
Channel: Adobe Community : Popular Discussions - InDesign SDK
Viewing all articles
Browse latest Browse all 78596

How to change pasteboard size

$
0
0

I'm trying to change the size of the pasteboard in code, in the same way that a user would change it via Guides and Pasteboard Preferences.

 

The code I have at the moment seems to change the values displayed in the preferences dialog for "Horizontal margins" and "Vertical margins", but doesn't actually change the visible pasteboard.

Any ideas on what I'm doing wrong?

 

IDocument* doc = Utils<ILayoutUIUtils>()->GetFrontDocument();

InterfacePtr<IPasteboardPrefs> pasteboardPrefs(static_cast<IPasteboardPrefs>(::QueryPreferences(IID_IPASTEBOARDPREFERENC ES, doc)));

pasteboardPrefs->SetPasteboardBorder(newXVal, newYVal);

 

I've also tried an "apply" command I found, in follow up to the above code, but it made no difference:

 

InterfacePtr<ICommand> setPasteboardCmd(CmdUtils::CreateCommand(kSetPasteboardPrefsCmdBoss));

if (setPasteboardCmd) {

    CmdUtils::ProcessCommand(setPasteboardCmd);

}


Thanks in advance


Viewing all articles
Browse latest Browse all 78596


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>