Proper way to regenerate current view

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
RMan
User
Posts: 221
Joined: Tue Jul 02, 2013 10:06 pm

Proper way to regenerate current view

Post by RMan »

What would be the proper way to force the SDK to redraw the visible portion of the pages and all content on them?

We're running into some problems with PDF files with images where strips on the current page or pages are not being redrawn. We are typically seeing it when using the vertical scrollbar to scroll through pages really fast and compiled for Win32.

I have been able to reproduce the problem even in the FullDemo sample when compiled for Win32 and here's a screen capture of when it happened and you can see that both the image and the watermarks are not completely redrawn. The only way I've been able to get the page to regenerate when this happens is to use an annotation tool like the rectangle and while drawing it any area I go over is redrawn. Sometimes just clicking in the window redraws it but not always.

In this case even though the image looks monochrome it is a color image in the PDF file.
EditorSDKNotRedrawing.jpg
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Proper way to regenerate current view

Post by Vasyl-Tracker Dev Team »

Hi RMan.

We tried to reproduce it in our SDK samples or even in Editor EU, but couldn't. Can you confirm that it is reproducible with the latest 361 build?

If yes - maybe it is settings/document related? Or any other tips on how to reproduce it?

Anyway, you may redraw the pages view by pdfCtl.Doc.ActiveView.PagesView.Redraw().

Cheers.
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.
RMan
User
Posts: 221
Joined: Tue Jul 02, 2013 10:06 pm

Re: Proper way to regenerate current view

Post by RMan »

I cleaned up everything last night and redownloaded the latest build and I can reproduce it with the FullDemo sample compiled as X86. It's a bit hard but here's how I've been able to recreate it. I have a multimonitor setup and I have been able to recreate it on all 3 monitors but the first monitor it does seam to be harder to recreate it.

I've been running the Release.x86 and will open this sample file.
SamplePageNotRedrawing.pdf
(4.6 MiB) Downloaded 41 times
Then I'll move the FullDemo window over to the second monitor and make it fullscreen which seams to make it happen faster. Then use the mouse in the vertical scrollbar and keep moving up and down in different increments really fast without releasing the mouse and usually within 10 seconds or so I'll notice a page not fully redrawing and stop. No matter how long I wait it never gets redrawn and when I go to close the app I get an Exception Error in the new build. I did try adding the redrawing code to a button and that didn't do it either.

I can also do an online meeting tomorrow with the team if this doesn't help you recreate it there using these steps.

I also noticed that the FullDemo sample appears to throw an exception error when exiting the application after this happens.
EditorDebugInfo.jpg

- $exception {"External component has thrown an exception."} System.Runtime.InteropServices.SEHException
+ Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
ErrorCode -2147467259 int
HResult -2147467259 int
HelpLink null string
+ InnerException null System.Exception
Message "External component has thrown an exception." string
Source "System.Windows.Forms" string
StackTrace " at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)\r\n at System.Windows.Forms.AxHost.DetachAndForward(Message& m)\r\n at System.Windows.Forms.AxHost.WndProc(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)" string
+ TargetSite {IntPtr CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)} System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}
+ Static members
- Non-Public members
IPForWatsonBuckets 0x00000000 System.UIntPtr
IsTransient false bool
RemoteStackTrace null string
+ WatsonBuckets {byte[5616]} object {byte[]}
_HResult -2147467259 int
_className null string
+ _data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
_dynamicMethods null object
_exceptionMethod null System.Reflection.MethodBase
_exceptionMethodString null string
_helpURL null string
+ _innerException null System.Exception
_ipForWatsonBuckets 0x00000000 System.UIntPtr
_message "External component has thrown an exception." string
_remoteStackIndex 0 int
_remoteStackTraceString null string
+ _safeSerializationManager {System.Runtime.Serialization.SafeSerializationManager} System.Runtime.Serialization.SafeSerializationManager
_source "System.Windows.Forms" string
+ _stackTrace {sbyte[192]} object {sbyte[]}
_stackTraceString null string
+ _watsonBuckets {byte[5616]} object {byte[]}
_xcode -529697949 int
_xptrs 0x00afc7d4 System.IntPtr
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Proper way to regenerate current view

Post by Vasyl-Tracker Dev Team »

We reproduced a similar issue with redrawing but only with Prefs>PageDisplay>SyncPagesRendering==Yes settings.
Will investigate it, maybe such two cases are related...

According to the exception you got:

1. Did you use the official, unmodified FullDemo-sample?
2. Next time when it throws an exception - please make a crashdump for FullDemo.exe (via TaskManager) process and provide it for us, with the actual FullDemo.pdb file. Thanks.

Cheers.
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.
RMan
User
Posts: 221
Joined: Tue Jul 02, 2013 10:06 pm

Re: Proper way to regenerate current view

Post by RMan »

That does look like it solves it on my end with your demo as well as our program Thanks for a solution for now.

I'll do some more testing tomorrow and also create the crash with the original demo sample and get a dump file for you.
User avatar
Chris - Tracker Supp
Site Admin
Posts: 795
Joined: Tue Apr 14, 2009 11:33 pm

Re: Proper way to regenerate current view

Post by Chris - Tracker Supp »

Great, thanks Rman :)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.


Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com
Post Reply