ورود

نسخه کامل مشاهده نسخه کامل : PDF



Nakh0d4
28-06-2010, 15:52
من ميخواستم يه برنامه بنويسم كه يه متني كه تو textbox مي نويسي رو تو PDF ذخيره كنه!:19: از TallComponents.PDF.Layout.dll استفاده كردم و برنامه خود help رو اجرا ميكنم ولي erorr زيرو ميده

Error 1 Reference required to assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' containing the type 'System.Web.[ برای مشاهده لینک ، لطفا با نام کاربری خود وارد شوید یا ثبت نام کنید ]'. Add one to your project. C:\Documents and Settings\ma\Local Settings\Application Data\Temporary Projects\helloworld\HelloWorld.vb 20 17 helloworld


2.3. Hello World Console Application – VB.NET
To create a Console Application in VB.NET that generates a PDF document, do the following:
1. Start Visual Studio .NET 2003 or 2005.
2. Select menu item File > New > Project.
3. From the New project dialog, select project type ‘Visual Basic’ and project template
‘Console application’.
4. Enter a name for the project and the folder to store the project, then click Ok.
5. A default project is created.
6. Select menu item Project > Add Reference…
7. Select the Browse… tab, select TallComponents.PDF.Layout.dll and click Ok.
8. Open Module1.vb from the solution explorer.
9. Replace the code in this file with the code below.
10. Save, compile and run the application.
11. Open the newly generated PDF document.

Imports

System.IO

Imports


TallComponents.PDF.Layout

Imports


TallComponents.PDF.Layout.Paragraphs

Module


HelloWorld

Sub


Main()

' create a document
Dim


doc As New Document

' add a section
Dim


section As New Section

doc.Sections.Add(section)
' add a text paragraph
Dim


textParagraph As New TextParagraph

section.Paragraphs.Add(textParagraph)
' add a text fragment
Dim


fragment As New Fragment

fragment.Text = "Hello world!"
textParagraph.Fragments.Add(fragment)
' save document as PDF to disk
Using


fs As FileStream = New FileStream("hello.pdf", FileMode.Create)

ارور تو اين خطه doc.Write(fs)
End Using
End Sub
End Module
اشكال كار كجاس؟

Nakh0d4
28-06-2010, 17:36
درست شد:31:
بايد system.web تو refrence اضافه ميكردم