Python anybody?

Python anybody?

Forum member · Apr 15, 2009
Has anybody tried using ceTe's libraries from Python? When I run the program below PageSize isn't defined. Anyone know where it is? mport clr import sys import System sys.path += ['c:\\program files\\ceTe Software\\DynamicPDF v5.0.2 for .NET\\bin\\'] clr.AddReference('ceTe.DynamicPDF.35') import ceTe.DynamicPDF from ceTe.DynamicPDF import PageElements; document = ceTe.DynamicPDF.Document() document.Author = "Thomas Gagne" document.Title = "Hello world" page = ceTe.DynamicPDF.Page(PageSize.Letter, PageOrientation.Portrait, 54.0) label = Label("Hello!", 0, 0, 504, 100, Font.Helvetica, 18, TextAlign.Center) page.Elements.Add(label) document.Pages.Add(page) document.Draw ("helloWorld.pdf") System.Diagnostics.Process.Start("helloWorld.pdf")

Re: Python anybody?

Support · Apr 16, 2009
Hello, You can access the PageSize enumeration from the ceTe.DynamicPDF namespace. You can refer to the members of the ceTe.DynamicPDF namespace on our help documentation. We have not done any testing using our product with Python. Thanks, ceTe Software Support Team.

Re: Python anybody?

Forum member · Apr 16, 2009
I was able to get the following program to work. import clr import sys import System sys.path.append('c:\\program files\\ceTe Software\\DynamicPDF v5.0.2 for .NET\\bin\\') clr.AddReference('ceTe.DynamicPDF.35') import ceTe.DynamicPDF from ceTe.DynamicPDF import * from ceTe.DynamicPDF.PageElements import * document = Document() document.Author = "Thomas Gagne" document.Title = "Hello world" page = Page(PageSize.Letter, PageOrientation.Portrait, 54.0) label = Label("Hello!", 0, 0, 504, 100, Font.Helvetica, 18, TextAlign.Center) page.Elements.Add(label) document.Pages.Add(page) document.Draw ("helloWorld.pdf") System.Diagnostics.Process.Start("helloWorld.pdf")