Apply IPXV_PagesLayoutManager to another document ?  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Apply IPXV_PagesLayoutManager to another document ?

Post by zarkogajic »

Hi support,

Say I have 2 (ipxv) documents open (actually the same documents opened twice).

Say I change the zoom, the page number, and the rest for the first document. All those are properties of IPXV_PagesLayoutManager for that document's ActiveView.PagesView.

What would be the fastest way to apply the same settings to the second document?

I've tried:

doc2.ActiveView.PagesView.Layout := doc1.ActiveView.PagesView.Layout

I was (crazy) hoping this would work :)

p.s.
Yes, I can get zoom level, zoom mode, current page and the rest one by one and apply one by one .. but am hoping for a more direct "assign/apply this view/layout to that document" approach.

Any ideas / suggestions?


-žarko
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Apply IPXV_PagesLayoutManager to another document ?  SOLVED

Post by Vasyl-Tracker Dev Team »

Hi, žarko.

The correct way for your case:

Code: Select all

PXV_VirtualPoint pos = srcLayout.GetCurPos();
PXV_ZoomMode zm = srcLayout.ZoomMode;
double zl = srcLayout.ZoomLevel;
PXC_PagesLayout pl = srcLayout.LayoutMode;

dstLayout.LockUpdates();
dstLayout.LayoutMode = pl;
dstLayout.SetZoom(zm, zl);
dstLayout.SetCurPos(pos);
dstLayout.UnlockUpdates();
HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: Apply IPXV_PagesLayoutManager to another document ?

Post by zarkogajic »

Hi Vasyl,

Thanks, that'll do it then.

Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Apply IPXV_PagesLayoutManager to another document ?

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply