Change F11-Preview app for pdf files

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
raphaelmsx
Posts: 52
Joined: 10 Oct 2021 20:55

Change F11-Preview app for pdf files

Post 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. :titter:

Please help! :biggrin:

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Change F11-Preview app for pdf files

Post by highend »

User-defined preview handler for pdf:
pdf>{3D3B1846-CC43-42AE-BFF9-D914083C2BA3}
One of my scripts helped you out? Please donate via Paypal

raphaelmsx
Posts: 52
Joined: 10 Oct 2021 20:55

Re: Change F11-Preview app for pdf files

Post by raphaelmsx »

Thanks a lot!!!

raphaelmsx
Posts: 52
Joined: 10 Oct 2021 20:55

Re: Change F11-Preview app for pdf files

Post 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>
Attachments
error01.PNG
error01.PNG (47.15 KiB) Viewed 1060 times

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Change F11-Preview app for pdf files

Post by highend »

Try different (stable / prerelease) versions of Sumatra?
One of my scripts helped you out? Please donate via Paypal

Horst
Posts: 1331
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Change F11-Preview app for pdf files

Post by Horst »

The actual pre-release version of SumatraPDF works fine for me
with the newest XY.
https://www.sumatrapdfreader.org/prerelease
Windows 11 Home, Version 25H2 (OS Build 26200.7171)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1400a (x64), Everything Toolbar 2.1.0, Listary Pro 6.3.6.99

raphaelmsx
Posts: 52
Joined: 10 Oct 2021 20:55

Re: Change F11-Preview app for pdf files

Post by raphaelmsx »

Horst wrote: 21 May 2025 14:08 The actual pre-release version of SumatraPDF works fine for me
with the newest XY.
https://www.sumatrapdfreader.org/prerelease
Just did that, and now it's not working anytime.

Horst
Posts: 1331
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Change F11-Preview app for pdf files

Post by Horst »

raphaelmsx wrote: 21 May 2025 15:34
Horst wrote: 21 May 2025 14:08 The actual pre-release version of SumatraPDF works fine for me
with the newest XY.
https://www.sumatrapdfreader.org/prerelease
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.
Windows 11 Home, Version 25H2 (OS Build 26200.7171)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1400a (x64), Everything Toolbar 2.1.0, Listary Pro 6.3.6.99

raphaelmsx
Posts: 52
Joined: 10 Oct 2021 20:55

Re: Change F11-Preview app for pdf files

Post by raphaelmsx »

Horst wrote: 21 May 2025 17:30
raphaelmsx wrote: 21 May 2025 15:34
Horst wrote: 21 May 2025 14:08 The actual pre-release version of SumatraPDF works fine for me
with the newest XY.
https://www.sumatrapdfreader.org/prerelease
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?

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Change F11-Preview app for pdf files

Post 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?
One of my scripts helped you out? Please donate via Paypal

raphaelmsx
Posts: 52
Joined: 10 Oct 2021 20:55

Re: Change F11-Preview app for pdf files

Post 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.

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Change F11-Preview app for pdf files

Post 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...
One of my scripts helped you out? Please donate via Paypal

raphaelmsx
Posts: 52
Joined: 10 Oct 2021 20:55

Re: Change F11-Preview app for pdf files

Post 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:
Attachments
explorer.PNG
explorer.PNG (42.87 KiB) Viewed 963 times

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Change F11-Preview app for pdf files

Post 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?
One of my scripts helped you out? Please donate via Paypal

raphaelmsx
Posts: 52
Joined: 10 Oct 2021 20:55

Re: Change F11-Preview app for pdf files

Post 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.



Post Reply