none
Opening a .XFDL file in a webbrowser

    Question

  • I'm trying to open a .XFDL document in a webbrowser using visual basic.  The file is in My.Resources, so I've had to convert it in order to open. The problem when I debug is that is displays in the browser as near endless code that I don't understand. Here is my code that works with .pdf files that I'm trying here: (A2_1 is the .xfdl file).
     
    Public Class DAForms
        Private PDFDocument As String
        Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
            AxWebBrowser1.Visible = True
            PDFDocument = System.IO.Path.GetTempFileName
            Dim s As System.IO.FileStream = System.IO.File.OpenWrite(PDFDocument)
            Dim bw As New IO.BinaryWriter(s)
    
            bw.Write(My.Resources.A2_1)
            bw.Close()
    
            AxWebBrowser1.Navigate2(PDFDocument)
        End Sub
    End Class

     Thanks for your time!
    Dustin
    Tuesday, January 17, 2012 11:40 PM

Answers

  • Did you ever get your answer to this?

    I am betting its because you are trying to open it from disk -

    XFDL isnt natively supported by browsers (that I know of) but by specific clients - the most uobiquitous is Lotus Forms Viewer.

    What happens if you manually save it to disk and then double click it... does it open in a viewer? If so, you should be able to openit programatically via a ProcessStart -

    PDFDocument = Path.ChangeExtension(Path.GetTempFileName(), "xfdl")
    File.WriteAllBytes(PDFDocument, My.Resources.A2_1)
    Process.Start(PDFDocument)


    gimme some slamming techno!!!!

    Thursday, May 10, 2012 4:01 AM
    Moderator

All replies

  • A webbrowser is nothing more than reusing the inbuild IE in the OS.

    So if you have this kind of problems, try it first in IE, the results will be the same.

     


    Success
    Cor
    Wednesday, January 18, 2012 7:45 AM
  • I thought the same thing, but it works well opening it with Internet explorer...

    Wednesday, January 18, 2012 10:41 PM
  • Did you ever get your answer to this?

    I am betting its because you are trying to open it from disk -

    XFDL isnt natively supported by browsers (that I know of) but by specific clients - the most uobiquitous is Lotus Forms Viewer.

    What happens if you manually save it to disk and then double click it... does it open in a viewer? If so, you should be able to openit programatically via a ProcessStart -

    PDFDocument = Path.ChangeExtension(Path.GetTempFileName(), "xfdl")
    File.WriteAllBytes(PDFDocument, My.Resources.A2_1)
    Process.Start(PDFDocument)


    gimme some slamming techno!!!!

    Thursday, May 10, 2012 4:01 AM
    Moderator
  • @Blair, Nice to hear from you again man! I have not gotten an answer, but I will definitely try this. My focus has shifted to trying to use visual studio to create a website. Actually, do you have any knowledge in the area? (using visual studio to create an .asp.net website) Or do you have any suggestions as to where I should begin?

    I'll post a reply to the question above when I try it out! Thanks again!

    Thursday, May 17, 2012 12:23 AM
  • If you need lotus forms viewer, you can download v3.5.1 here:

    http://www.e-publishing.af.mil/shared/media/epubs/resource/Viewer_DSig_3.5.1.333.exe


    gimme some slamming techno!!!!

    Thursday, May 17, 2012 4:25 AM
    Moderator