Home

PDFDoc Scout

PDFDoc Scout screenshot (click to enlarge)



PDFDoc Scout library - Sample

Download Free Trial See Licensing Options More Information

Quick Guide on using PDFDoc Scout library with ClickOnce deployment style in ASP.NET 2 web-sites

You can download the source code of this example here: pdfdocscout_using_watermarks.zip

This example describes how to use watermarking support in PDFDoc Scout library (using HTML2PDF rendering features to produce watermark text):

Option Explicit

Dim PDFDoc, WatermarkIndex, WatermarkPage, i, j
Set PDFDoc = CreateObject("PDFDocScout.PDFDocument")

PDFDoc.InitLibrary "demo", "demo"
PDFDoc.OutputFilename = "Using_Watermarks.pdf"
PDFDoc.AutoOpenGeneratedPDF = true

PDFDoc.BeginDocument

' create a watermak
WatermarkIndex = PDFDoc.AddWatermark
' access watermark object replicating IPage object interface
Set WatermarkPage = PDFDoc.Watermarks(WatermarkIndex)
' draw a header
PDFDoc.Watermarks(WatermarkIndex).Width = PDFDoc.Page.Width
PDFDoc.Watermarks(WatermarkIndex).Height = PDFDoc.Page.Height

WatermarkPage.AddHTMLBox "This is a <b>header</b> text watermark", 0,0,400,100, false
' draw a footer

WatermarkPage.AddHTMLBox "This is a <b>Footer</b> text watermark", 0, PDFDoc.PageHeight-300,PDFDoc.PageWidth,PDFDoc.PageHeight, false

For I = 0 to 20
PDFDoc.Page.AddHTMLBox "content of #" & CStr(I) & " page goes here", 200, 200, 400,400, true
PDFDoc.AddPage
Next

' now set watermark for all existing pages in PDF document

For I=0 to PDFDoc.PagesCount-1
PDFDoc.Pages(I).WatermarkIndex = WatermarkIndex
Next

PDFDoc.EndDocument ' close PDF document generation

' disconnect from library
Set PDFDoc = Nothing

You can download the source code of this example here: pdfdocscout_using_watermarks.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