VB.NET create pdf file vb.net - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution
join us

create pdf file vb.net


 122

VB.NET


0

<%@ Page Language="VB" %>

<!-- code section -->
<script runat="server">

Imports PdfSharp
Imports PdfSharp.Drawing
Imports PdfSharp.Pdf

Sub request_click(ByVal sender As Object, ByVal e As EventArgs)

Dim pdf As PdfDocument = New PdfDocument
pdf.Info.Title = "My PDF file"

Dim pdfPage As PdfPage = pdf.AddPage

Dim graph As XGraphics = XGraphics.FromPdfPage(pdfPage)

Dim font As XFont = New XFont("Verdana", 15, XFontStyle.Bold)

graph.DrawString("My PDF file", font, XBrushes.Black, _
New XRect(0, 0, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.Center)

Dim pdfFilename As String = "mypdffile.pdf"

pdf.Save(pdfFilename)

Process.Start(pdfFilename)

End Sub

</script>

<html>
<head>
</head>
<body>
<form runat="server">
<input runat="server" id="button1" type="submit" value="click" OnServerClick="request_click"/>
</form>
</body>
</html>


By        
The power of the user (%)
18%



The most helpful VB.NET solutions

get computer name vb.net get computer name vb.net VB.NET

Click to see more ...

  1.1K     76

get domain name vb.netget domain name vb.netVB.NET

Click to see more ...

  926     71

how to get client ip address using vb.net ?how to get client ip address using vb.net ?VB.NET

Click to see more ...

  766     63

How to get client machine name or computer name with vb.net?How to get client machine name or computer name with vb.net?VB.NET

Click to see more ...

  1K     57

array vb.netarray vb.netVB.NET

Click to see more ...

  509     56

get client country vb.netget client country vb.netVB.NET

Click to see more ...

  445     52

get client latitude and longitude vb.netget client latitude and longitude vb.netVB.NET

Click to see more ...

  291     36

detect mobile vb.netdetect mobile vb.netVB.NET

Click to see more ...

  258     23

get machine name vb.netget machine name vb.netVB.NET

Click to see more ...

  271     22

detect browser vb.netdetect browser vb.netVB.NET

Click to see more ...

  180     16

Welcome aboard!
We are happy you are here and
wish you good net-raft!