question

MarinMiko-5074 avatar image
1 Vote"
MarinMiko-5074 asked bemi-2758 edited

Pdfs stopped working (win10)

Hi,

We here using in out application PdfSharp.Viewing and in a different the System.Windows.Controls.WebBrowser pdfWebViewer to display Pdf files (Acrobat) ... After the recent update of win10 none of these is working any more. While in the "PdfSharp.Viewing" the system just pretends the file was loaded and diplays nothing. the browser just crashes. This is only a problem on windows 10, lower versions are working fine.
Is there something specific I have missed?

Thanks

windows-10-generalwindows-wpfwindows-forms
· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Does it work if you recompile your projects using 32-bit (x86) configuration, or create a new Forms application for such tests?


1 Vote 1 ·

@MarinMiko-5074
Is your project a WPF project? If it is, which target platform is it? And could you tell me more details of PdfSharp.Viewing? By the way, what the version number of your Win10? If it is convient for you, please provide some code which will allow me to create a sample to analyze your problem faster.

0 Votes 0 ·

Well this is definitely a Adobe problem caused by the latest Windows 10 update (it is starting to be kinda annoying since the printing problem was fixed just recently in february release and now there is a new bug)

We have both a WPF (core) and a Winform app.

The WPF app is just an in-house report generating tool where we use it to display the generated pdf files a simple browser "System.Windows.Controls.WebBrowser". I have tried to debug it, but the call of the "Navigate" method just jumps out of the debuger ignoring the try block and the app just continues (so I'm kinda lost here).

In the winform app we use PdfSharp.VIewing (1.31.1789.0). Here we just derive from the PdfAcroViewer control, witch renders the PDF file and has a "LoadFile(string fileName)" method.
Here the system does not crash, but it opens Acrobat with its menu and options, but it looks like it is not able to render the file.

0 Votes 0 ·
 this.pdfViewer = new PdfAcroViewer(); // We use here our own derived class
 this.SuspendLayout();

 // PDFViewer
 this.pdfViewer.BackColor = SystemColors.ControlDark;
 this.pdfViewer.Dock = DockStyle.Fill;
 this.pdfViewer.Location = new Point(0, 0);
 this.pdfViewer.Name = "pdfViewer";
 this.pdfViewer.TabIndex = 0;
 this.ResumeLayout();
 this.Controls.Add(this.pdfViewer);
        
 // then you do the load
 this.pdfViewer.LoadFile(this.ReportName);
 // This function returs a Boolean, in our case True 
 //(so in my own opinion it has something to do with rendering, but I have no idea)

We have plugged it for now by adding support for Sumatra, but everyone is using Adobe so I bet there will be a lot of unhappy customers.
We are displaying some Forms as Html pages (CefSharp) so we have tried to display it as a page. While this funcions if you press print the printed file does not look like the displayed one (Same result, if you do it in Chrome).

0 Votes 0 ·

Is it a Windows application or web application?
Have you tried a different PDF reader?

0 Votes 0 ·

Both are desktop apps.
Yes Sumatra has no problem with rendering of the documents.

0 Votes 0 ·

@MarinMiko-5074
Did you use Microsoft Edge as the browser to open the pdf? Did you use WebBrowser.Navigate to show pdf?

0 Votes 0 ·

I discovered the same problem on 2 different computers, today.

After last Windows update, displaying PDFs in WebBrowser control does not work anymore.

Tried to build for Any: Does not work anymore.
Tried to build for x86: This still works.
Tried to build for x64. Does not work anymore.

Details: Win10 Prof/Home, WPF .NET 5

0 Votes 0 ·

0 Answers