Samle to filer til én
HejsaJeg skal bruge Dynamic PDF.
I de kode eksempler der følger med gøres der brug af to filer:
HelloWorld.aspx:
<%@ Page
Language="vb"
Src="HelloWorld.aspx.vb"
Inherits="ceTe.DynamicPDF.Examples.VB.ASPX.HelloWorld"%>
-og-
HelloWorld.aspx.vb:
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Namespace ceTe.DynamicPDF.Examples.VB.ASPX
Public Class HelloWorld
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Set local ceTe.DyanmicPDF.Document object
Dim objDocument As New Document()
'Set document properties
objDocument.Creator = "HelloWorld.aspx"
objDocument.Author = "Test"
objDocument.Title = "Hello World"
'Create a page to add to the document
Dim objPage As ceTe.DynamicPDF.Page = New ceTe.DynamicPDF.Page(PageDimension.LetterPortrait)
'Uncomment the line below to add a layout grid to the page
'objPage.Elements.Add(New LayoutGrid())
'Create an HTMLTextArea to add to the page
Dim strText As String = "<p align='center'>Hej Verden...<br>Jeg <i>tester</i> <b>PDF</b>&tm; Generator.NET<br>Blib blop</p>"
Dim objHTML As HTMLTextArea = New HTMLTextArea( strText, 0, 0, 504, 100, FontFamily.Helvetica, 18, false )
'Add label to page
objPage.Elements.Add(objHTML)
'Add page to document
objDocument.Pages.Add(objPage)
objDocument.Draw(Me, "HelloWorld.pdf")
End Sub
End Class
End Namespace
Hvordan får jeg samlet dette til én fil??
fx HelloWorld.aspx
På forhånd tak
Mvh
Jens