Configuring PDF Options

FO.NET gives you control over many aspects of the generated PDF documents:
  • Passwords that control access to generated PDF documents.
  • The Author, Title and Subject document properties.
  • The keywords embedded in the document properties.
  • Font embedding policy.
  • Addition of private fonts.
  • Whether or not to enable kerning.
PDF options are specified by passing an instance of PdfRendererOptions to the Fonet.

Imports Fonet
Imports Fonet.Render.Pdf

Module FonetTest

    Sub Main()
        Dim options As New PdfRendererOptions()
        options.Author = "David Brent"
        options.Title = "How to Motivate Your Staff"
        options.Subject = "Management Guide"
        options.EnableModify = False
        options.EnableAdd = False
        options.EnableCopy = False
        options.EnablePrinting = True
        options.OwnerPassword = "slough"

        Dim driver As FonetDriver = FonetDriver.Make
        driver.Options = options
        driver.Render("input.fo", "output.pdf")
    End Sub

End Module

Last edited Jan 31, 2009 at 5:52 AM by griffm, version 1

Comments

arvindrobinkumar Jul 9, 2014 at 10:18 AM 
Now I am able to get the password popup while opening the pdf file. We need to set options.UserPassword. But I dont understand the owner password. Can anyone give more explanation on this?

arvindrobinkumar Jul 9, 2014 at 9:48 AM 
When I try to open the pdf file, I was not asked to enter the password. Is there any thing else we need to do? Is OwnerPassword meant for the password that will be asked when opening the file?