Home

PDFDoc Scout

PDFDoc Scout screenshot (click to enlarge)


 Products  |  Download  |  Purchase  |  Support  |  Contacts  |  Testimonials |  
PDFDoc Scout library - Sample

Download Free Trial See Licensing Options More Information

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
 
VC# IDE file menu
 
The New Project Wizard will appear. Select Windows Application in Visual C# Projects group:
 
New project wizard in n~ sharp
 
2) Visual C# will create a new empty project:
 
New project generated by C# project wizard
 
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:
 
Add reference menu in VC#
 
Switch to COM tab and find PDFDoc Scout library in the list of available ActiveX/COM objects:
 
Add reference dialog
 
Click Select button to add the reference to PDFDoc Scout library and click OK:
 
Click OK in Add Reference dialog
 
4) Double-click on form Form1 to create the Form1_Load procedure (this procedure will be execute on Form1.OnLoad event):
 
Blank form in C# project
 
The source code editor window will appear:
 
Auto generated form load procedure
 
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
PDFDoc.AutoOpenGeneratedPDF = true; // automatically open generated PDF in default PDF viewer application if available


PDFDoc.BeginDocument(); // begin document
PDFDoc.Page.AddText("Hello, World!", 100, 100, 15); // add text
PDFDoc.EndDocument(); // end document generation

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:
Start project menu
 
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:
 
Generated PDF movie
 
You can download the source code of this example here: pdfdocscout_csharp.zip

Download Free Trial See Licensing Options More Information


See also: Bytescout.PDF - native .NET library to write/read/sign/
modify/merge/split PDF documents (but no HTML2PDF support)



On-line documentation (HTML format)


"Hello, World!" quick start step-by-step tutorials:

Products  |  Download  |  Purchase  |  Support  |  Contacts  |  Testimonials |  

ByteScout, 2003-2008. All other company and product names may be trademarks of their respective companies. Privacy Statement