Lock PagesView from updates SOLVED
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
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.
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.
-
- User
- Posts: 1501
- Joined: Thu Sep 05, 2019 12:35 pm
Lock PagesView from updates
Hi Support,
How do I lock updates to IPXV_PagesView ?
I'm running a list of op.document.replaceFonts and while this is being done I would like the pagesView not to update (after each operation).
I've tried registering an event monitor and in OnEventMonitor:
//pseudo
if (pEvent.Code = e.Render) OR (pEvent.Code = e.PostRender) then pEvent.Handled = true
This kind of works - but there *are* some glitches being rendered whatsoever. Maybe I'm missing an event code?
I've also tried IPXV_PagesViewDrawCallback but not sure how to stop OnDrawPagesView from drawing ...
-žarko
How do I lock updates to IPXV_PagesView ?
I'm running a list of op.document.replaceFonts and while this is being done I would like the pagesView not to update (after each operation).
I've tried registering an event monitor and in OnEventMonitor:
//pseudo
if (pEvent.Code = e.Render) OR (pEvent.Code = e.PostRender) then pEvent.Handled = true
This kind of works - but there *are* some glitches being rendered whatsoever. Maybe I'm missing an event code?
I've also tried IPXV_PagesViewDrawCallback but not sure how to stop OnDrawPagesView from drawing ...
-žarko
-
- Site Admin
- Posts: 11165
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Lock PagesView from updates
Hello, zarkogajic
I have made note of this to our Dev team, hopefully one of them can come offer some advice when they have a free minute.
Kind regards,
I have made note of this to our Dev team, hopefully one of them can come offer some advice when they have a free minute.
Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
-
- Site Admin
- Posts: 11165
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Lock PagesView from updates
Hello again,
I received the following from the Dev team, I hope it helps!
I received the following from the Dev team, I hope it helps!
Kind regards,Misha wrote:Hello
In his latest forum posts, Zarko was interested in the page region selection feature, and here notes that he uses a list of ReplaceFonts operations. I assume that he is trying to replace the font in a specific region several times. But after performing the operation, the text may shift (if the replacement is not only colour). That is, the text in the region before the execution will not exactly match what we get after.
I'm afraid that in this case, the PagesView rendering delay won't help him. The text has been changed at a deeper level (content), and visual display with or without a delay will not affect the next execution.
You can advise him to change his approach to specify the replacement rules so that they fully match the desired result and perform the operation once.
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
-
- User
- Posts: 1501
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Lock PagesView from updates
Hi Dan, Misha,
I am not replacing the font in a specific region several times.
I am replacing the color (so only color) of text in a specific region. Multiple such specific regions (different pages, different regions).
I cannot run IOperation once as I need to run the op.document.replaceFonts for each region / page (multiple regions per page).
So, I'm using
Options.PagesRange.Type = 10 // custom rect
Options.PagesRange.Custom = page_number
Options.PagesRange.CustomRect.left/top/bottom/right = ..."
While this is being done (in a loop) I would like to stop PagesView from updating after each execution of the operation. ....
-žarko
I am not replacing the font in a specific region several times.
I am replacing the color (so only color) of text in a specific region. Multiple such specific regions (different pages, different regions).
I cannot run IOperation once as I need to run the op.document.replaceFonts for each region / page (multiple regions per page).
So, I'm using
Options.PagesRange.Type = 10 // custom rect
Options.PagesRange.Custom = page_number
Options.PagesRange.CustomRect.left/top/bottom/right = ..."
While this is being done (in a loop) I would like to stop PagesView from updating after each execution of the operation. ....
-žarko
-
- Site Admin
- Posts: 11165
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Lock PagesView from updates
Hello, zarkogajic
the team is still discussing possible alternatives, but here is one working solution we have found so far:
Before executing the list of operations, you need to use the ‘e.document.beforeChangePagesList’ event, and after — ‘e.document.afterChangePagesList’. This will help prevent PagesView from being redrawn during operations.
Kind regards,
the team is still discussing possible alternatives, but here is one working solution we have found so far:
Before executing the list of operations, you need to use the ‘e.document.beforeChangePagesList’ event, and after — ‘e.document.afterChangePagesList’. This will help prevent PagesView from being redrawn during operations.
Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
-
- User
- Posts: 1501
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Lock PagesView from updates
Hi Dan,
Thanks.
How to "use" those events? Fire them for document?
-žarko
Thanks.
How to "use" those events? Fire them for document?
-žarko
-
- Site Admin
- Posts: 11165
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Lock PagesView from updates
Hello, zarkogajic
Yes, you need to fire them for the document.
Here is the pseudocode:
Kind regards,
Yes, you need to fire them for the document.
Here is the pseudocode:
Code: Select all
int eventIDBefore = pxvInst.Str2ID(‘e.document.beforeChangePagesList’);
int eventIDAfter = pxvInst.Str2ID(‘e.document.afterChangePagesList’);
IEvent eventBefore = doc.EventServer.CreateNewEvent(eventIDBefore, 0, 0);
doc.EventServer.FireEvent(eventBefore, doc);
for (...)
{
...
Op.Do();
}
IEvent eventAfter = doc.EventServer.CreateNewEvent(eventIDAfter, 0, 0);
doc.EventServer.FireEvent(eventAfter, doc);
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
-
- User
- Posts: 1501
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Lock PagesView from updates
Hi Dan,
Tx. Will try and report back (next week).
-ž
Tx. Will try and report back (next week).
-ž
-
- Site Admin
- Posts: 11165
- Joined: Wed Jan 03, 2018 6:52 pm
Lock PagesView from updates

Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
-
- User
- Posts: 1501
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Lock PagesView from updates SOLVED
That does it 
-žarko

-žarko
-
- Site Admin
- Posts: 11165
- Joined: Wed Jan 03, 2018 6:52 pm
Lock PagesView from updates

Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com