PDFDoc Scout |
PDFDoc Scout library - Sample
Quick Guide on how to create "Hello, World!"
PDF document using Visual C# and PDFDoc Scout library
You can download the source code of this example here: pdfdocscout_csharp.zip This page will show how to use Visual C# and PDFDoc Scout library to create "Hello, World!" PDF document (.PDF) 1)
Install PDFDoc
Scout
library on your
computer and run Microsoft
Visual Studio.NET
Go to New
menu and click Project...
to create
new Visual
C# project
![]() The New Project
Wizard will
appear. Select Windows
Application
in Visual
C# Projects group:
![]() 2) Visual
C# will create
a new empty project:
![]() 3) To
use PDFDoc
Scout library
in Visual
C# application
we should add the reference to PDFDoc
Scout. Select
Project
in the main menu and then select Add
Reference
command:
![]() Switch to COM
tab and find
PDFDoc Scout
library in
the list of available ActiveX/COM objects:
![]() Click Select
button to
add the reference to PDFDoc
Scout library
and click OK:
![]() 4) Double-click
on form Form1 to create the Form1_Load procedure
(this procedure will be execute on Form1.OnLoad event):
![]() The source code editor
window will appear:
![]() 5)
The following code snippet generates simple "Hello, World!"
PDF document and saves it into "c:\HelloWorld.PDF" file:
PDFDocScout.PDFDocument PDFDoc = new PDFDocScout.PDFDocument(); PDFDoc.InitLibrary("demo", "demo"); PDFDoc.OutputFileName = "c:\\HelloWorld.pdf";
// set output PDF filename Hint: you
can simply copy the source code from the snippet above and
paste into Visual C# source code editor
6)
Press F5 to
run the application (you can also use "Debug"
| "Start"
menu command) and Visual
C#.NET will
run the application:
![]() The application will
create "Hello, World!" PDF animation movie and save it into
"c:\HelloWorld.PDF" file.
You can view generated
PDF animation using any application that can display PDF document:
Adobe Reader:
"Hello, World!" quick start step-by-step tutorials: |
|
|
||