Barsan PDF einlesen

This commit is contained in:
2023-09-26 11:40:02 +02:00
parent 94260b0656
commit 1b9023e3c3
2 changed files with 3 additions and 28 deletions

View File

@@ -150,6 +150,7 @@
Me.Button3.Label = "Barsan PDFs auslesen"
Me.Button3.Name = "Button3"
Me.Button3.ShowImage = True
Me.Button3.Visible = False
'
'Button4
'

View File

@@ -664,7 +664,7 @@ Public Class AVISO_Mail_Functions
' Dim sp = html.ToString.Split(srch.ToString)
Dim cnt = 0
For Each l In sp
If cnt > 0 AndAlso l.Contains(""">") Then ' ENDE
If cnt > 0 AndAlso l.Contains(""">") AndAlso cnt < 5 Then ' ENDE
Dim link = ("https://portal.barsan.com/Dokuman/DokumanGoster.aspx" & l.ToString.Substring(0, l.ToString.IndexOf(""">")))
@@ -672,33 +672,7 @@ Public Class AVISO_Mail_Functions
System.Net.ServicePointManager.SecurityProtocol = System.Net.ServicePointManager.SecurityProtocol Or SecurityProtocolType.Tls11 Or SecurityProtocolType.Tls12
If l.ToString.ToLower().Contains(".pdf") Then
Dim pdf = VERAG_PROG_ALLGEMEIN.cFormularManager.getPDFViaSpirePDF_FromURL(link)
'Process.Start(pdf)
'Dim client As New HttpClient()
'Try
' Dim response As HttpResponseMessage = Await client.GetAsync(link)
' response.EnsureSuccessStatusCode()
' Dim responseBody As String = Await response.Content.ReadAsStringAsync()
' Console.WriteLine(responseBody)
' Dim PDF = responseBody
'Catch e As HttpRequestException
' Console.WriteLine(vbLf & "Exception Caught!")
' Console.WriteLine("Message :{0} ", e.Message)
'End Try
'Dim TMP_PATH = GetTempFilePathWithExtension(".pdf")
'Dim TMP_PATH = VERAG_PROG_ALLGEMEIN.cFormularManager.getPDFViaSpirePDF_FromURL(res.ResponseUri.ToString)
''My.Computer.Network.DownloadFile(res.ResponseUri.ToString, TMP_PATH)
Dim pdf = VERAG_PROG_ALLGEMEIN.cFormularManager.getPDFViaSpirePDF_FromURLStream(link,, False)
If IO.File.Exists(pdf) Then
ATT.Add(pdf)