Basic PDF document

Discussion in 'Archives' started by Lil Wayne, Jun 30, 2007.

Basic PDF document
  1. Unread #1 - Jun 30, 2007 at 7:02 PM
  2. Lil Wayne
    Referrals:
    2

    Lil Wayne Guest

    Basic PDF document

    this guide will teach you how to create simple PDF document using PDFDoc Scout library and Visual Basic
    1) Install PDF Scout library on your computer and run Visual Basic. Go to File and click New

    [​IMG]

    The Project Wizard will appear

    [​IMG]

    2) Select Standard EXE project type and click Open to create a new project.
    Visual Basic will generate new project called Project1 and will automatically open the main form of the generated project:

    [​IMG]

    3) Click on Form1 surface and Visual Basic will show the code window for Form_Load event:

    [​IMG]

    4) Now you have to add the code that will create PDF document using PDF Scout library.

    Here is the source code that you can simply copy and paste into Visual Basic:

    Set PDFDoc = CreateObject("PDFDocScout.PDFDocument")
    PDFDoc.InitLibrary "demo", "demo"
    PDFDoc.OutputFileName = "HelloWorld.pdf"
    PDFDoc.AutoOpenGeneratedPDF = true ' automatically open generated PDF document in default PDF viewer application
    PDFDoc.BeginDocument

    ' add text to current page
    PDFDoc.Page.AddText "Hello, World!", 100, 100, 15
    PDFDoc.EndDocument ' close document
    This function will create PDF file "HelloWorld.PDF" pdf document on drive C:\

    Hint:
    You can simply copy the source code from the snippet above and then paste it in the Visual Basic code editor as it's shown on the screenshot below:

    5) Press F5 to run the application (you can also use "Run" | "Start" menu command).

    [​IMG]

    6) Visual Basic will run the application and application will generate PDF file "c:\HelloWorld.PDF".

    You can view generated pdf document file (.PDF) using Adobe Reader or another application that is capable of viewing pdf documents.

    [​IMG]

    Thanks for reading, I hope this helps.
     
  3. Unread #2 - Jul 1, 2007 at 2:10 AM
  4. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    Basic PDF document

    Nice find man, even though i can't think of anything to use this for I'm sure someone will. :) Also, glad to see people still program in VB6.
     
  5. Unread #3 - Jul 1, 2007 at 3:08 AM
  6. Jazz00006
    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0

    Jazz00006 Apprentice
    Visual Basic Programmers

    Basic PDF document

    HOLY SHOOT, your rez is huge...

    but you should explain it more...
    Code:
    PDFDoc.Page.AddText "Hello, World!", 100, 100, 15 
    > AddText(TEXT , X , Y , ROTATION)
    and other commands, such as
    > AddHTMLBox (HTML, X1,Y1, X2, Y2, [false])
     
  7. Unread #4 - Jul 1, 2007 at 8:55 AM
  8. Lil Wayne
    Referrals:
    2

    Lil Wayne Guest

    Basic PDF document

    @ Jazz00006 I'll add it in later.
     
< my new pure idea tell me what u think | Trading my staker for a ranger >

Users viewing this thread
1 guest


 
 
Adblock breaks this site