Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Can't open PDF files from WinForms

Guest
Feb 04, 2019 Feb 04, 2019

Hello,

I'm trying to embed a local PDF file in a Windows Forms application; right now I'm using a standard WebBrowser control, which takes care of instantiating a web browser and, if Acrobat Reader DC is the default document handler for PDF files, the web browser calls it in order to display the contents of the file. The problem is, instead of getting the file displayed, I'm getting a "103:103" error. I have already tried disabling the "Enable Protected Mode at startup" and the "Allow documents to hide the menu bar, toolbars and window controls" options, with no luck. If I simply click on the same document from the filesystem, the application opens it correctly. Besides, I cannot ask all my end users to change their Acrobat Reader configuration. Any suggestions?

2.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Feb 05, 2019 Feb 05, 2019

In that case, I think I'll just launch the default application for the PDF file format, looks like the safest choice to me. Thanks for your time, anyway.

Translate
LEGEND ,
Feb 04, 2019 Feb 04, 2019

Are you able to view local PDF files embedded in local HTML using Internet Explorer?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 04, 2019 Feb 04, 2019

Yes, Internet Explorer 11 correctly loads Acrobat Reader and displays the file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 05, 2019 Feb 05, 2019

Hmm. If that works it means Reader is basically ok. Since your use is outside the expected use of Reader, I doubt you can proceed further with this. There is a supported API for PDF display in your window, see the SDK.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 05, 2019 Feb 05, 2019

Can you be more specific? Where exactly should I look?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 05, 2019 Feb 05, 2019

In the Acrobat SDK. Most functions are for Acrobat only but there is one interface for Reader with OLE. Look in the “interapplication communication” section.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 05, 2019 Feb 05, 2019

But in that case I would have to rely on the assumption that users have Acrobat Reader installed on their machines, right?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 05, 2019 Feb 05, 2019

Or Acrobat, since Acrobat provides the same interface too, yes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 05, 2019 Feb 05, 2019
LATEST

In that case, I think I'll just launch the default application for the PDF file format, looks like the safest choice to me. Thanks for your time, anyway.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines