Page 1 of 2
Change F11-Preview app for pdf files
Posted: 19 May 2025 18:16
by raphaelmsx
Hi people!
I currently have Foxit for F11-Preview of files, but I want to change it to Sumatra, but completely forgot how to do it.
Please help!

Re: Change F11-Preview app for pdf files
Posted: 19 May 2025 19:15
by highend
User-defined preview handler for pdf:
pdf>{3D3B1846-CC43-42AE-BFF9-D914083C2BA3}
Re: Change F11-Preview app for pdf files
Posted: 19 May 2025 20:12
by raphaelmsx
Thanks a lot!!!
Re: Change F11-Preview app for pdf files
Posted: 21 May 2025 13:24
by raphaelmsx
Hi again.
I thought it was working ok, but in fact just sometimes.
The other times it returns this error:
Code: Select all
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Preview64.Form1.handlePreview(String[] arguments)
at Preview64.Form1.Form1_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at Preview64.Form1.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9310.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
XY64
Assembly Version: 1.0.8451.19745
Win32 Version: 1.0.0.30
CodeBase: file:///C:/Program%20Files%20(x86)/XYplorer/XY64.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9251.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9310.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9037.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9037.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9297.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9037.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
Re: Change F11-Preview app for pdf files
Posted: 21 May 2025 13:45
by highend
Try different (stable / prerelease) versions of Sumatra?
Re: Change F11-Preview app for pdf files
Posted: 21 May 2025 14:08
by Horst
The actual pre-release version of SumatraPDF works fine for me
with the newest XY.
https://www.sumatrapdfreader.org/prerelease
Re: Change F11-Preview app for pdf files
Posted: 21 May 2025 15:34
by raphaelmsx
Just did that, and now it's not working anytime.
Re: Change F11-Preview app for pdf files
Posted: 21 May 2025 17:30
by Horst
raphaelmsx wrote: ↑21 May 2025 15:34
Just did that, and now it's not working anytime.
I guess you didn't open the Setup options and select the preview option.
This is not enabled by default.
When you have done this, make a check in Explorer to see if it's available
before testing in XY.
Re: Change F11-Preview app for pdf files
Posted: 22 May 2025 11:19
by raphaelmsx
Horst wrote: ↑21 May 2025 17:30
raphaelmsx wrote: ↑21 May 2025 15:34
Just did that, and now it's not working anytime.
I guess you didn't open the Setup options and select the preview option.
This is not enabled by default.
When you have done this, make a check in Explorer to see if it's available
before testing in XY.
You mean user-defined preview handler for pdf?
Code: Select all
pdf>{3D3B1846-CC43-42AE-BFF9-D914083C2BA3}
Yes, I did, but what you mean test in explorer?
Re: Change F11-Preview app for pdf files
Posted: 22 May 2025 11:33
by highend
What horst meant:
The Sumatra Installer has a checkbox option which will only install the preview handler when ticked
In Windows Explorer preview the same .pdf file, does it work there (and with Sumatra as the preview handler)?
Just did that, and now it's not working anytime.
Which means you always get the error dialog now?
Re: Change F11-Preview app for pdf files
Posted: 22 May 2025 12:27
by raphaelmsx
highend wrote: ↑22 May 2025 11:33
What horst meant:
The Sumatra Installer has a checkbox option which will only install the preview handler when ticked
Yes, I checked it.
In Windows Explorer preview the same .pdf file, does it work there (and with Sumatra as the preview handler)?
It doesn't work.
Just did that, and now it's not working anytime.
Which means you always get the error dialog now?
Yes.
I also tried to set Edge as the preview handler, to no avail.
Re: Change F11-Preview app for pdf files
Posted: 22 May 2025 12:50
by highend
"It doesn't work" and "to no avail" is not helpful...
Describe exactly what happens, provide screenshot.
Do this for Windows Explorer before doing it for XY...
Re: Change F11-Preview app for pdf files
Posted: 22 May 2025 14:17
by raphaelmsx
highend wrote: ↑22 May 2025 12:50
"It doesn't work" and "to no avail" is not helpful...
Describe exactly what happens, provide screenshot.
Do this for Windows Explorer before doing it for XY...
Sure, for Edge as handler in XY it's the same error as posted before.
For Explorer:
Re: Change F11-Preview app for pdf files
Posted: 22 May 2025 14:28
by highend
Highly unlikely that the edge preview handler produces .net errors...
Use the latest .NET 4.8.1 offline installer again!
And you've already tried earlier versions of Sumatra as suggested?
Re: Change F11-Preview app for pdf files
Posted: 24 May 2025 15:38
by raphaelmsx
highend wrote: ↑22 May 2025 14:28
Highly unlikely that the edge preview handler produces .net errors...
Use the latest .NET 4.8.1 offline installer again!
And you've already tried earlier versions of Sumatra as suggested?
Hello again.
I uninstalled Sumatra, just to test with Edge for now.
Installed the suggested .NET 4.8.1 package.
It's still not working.
Code: Select all
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Preview64.Form1.handlePreview(String[] arguments)
at Preview64.Form1.Form1_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at Preview64.Form1.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9310.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
XY64
Assembly Version: 1.0.8451.19745
Win32 Version: 1.0.0.30
CodeBase: file:///C:/Program%20Files%20(x86)/XYplorer/XY64.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9251.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9310.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9037.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9037.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9297.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9037.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.