frnHauptfenster, etc.
This commit is contained in:
@@ -205,15 +205,23 @@ Public Class frmSendungAnhangImport
|
||||
PdfViewer.Visible = (loc <> "")
|
||||
If loc <> "" Then
|
||||
Dim data = File.ReadAllBytes(loc)
|
||||
Dim pdfStream = New MemoryStream(data)
|
||||
PdfViewer.LoadFromStream(pdfStream)
|
||||
pdfStream.Close()
|
||||
|
||||
Dim header As String = System.Text.Encoding.ASCII.GetString(data, 0, Math.Min(4, data.Length))
|
||||
|
||||
If header = "%PDF" Then
|
||||
|
||||
Dim pdfStream = New MemoryStream(data)
|
||||
PdfViewer.LoadFromStream(pdfStream)
|
||||
pdfStream.Close()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'NOT WORKING
|
||||
'PdfViewer.LoadFromFile(loc) NOT WORKING
|
||||
End If
|
||||
'NOT WORKING
|
||||
'PdfViewer.LoadFromFile(loc) NOT WORKING
|
||||
End If
|
||||
ElseIf typ = "BILD" Or typ = ".jpg" Then
|
||||
PdfViewer.Visible = False
|
||||
WebBrowser.Visible = (loc <> "")
|
||||
|
||||
Reference in New Issue
Block a user