User login

Who's online

There are currently 0 users and 82 guests online.

Advertisements


SourceForge.net Logo

general question

Submitted by sicnezz on Wed, 2007-03-07 20:06.

hi all,

i wanted to try the flypdf com object - but got an error - the activeX dll is missing - where can i find it?
i downloaded the latest release from the forum.

is pdfcreator required to get flypdf working?

has someone tried flypdf inside asp?

thx,
tom

Submitted by andydude on Thu, 2007-07-26 03:33.

i'm trying now

i got the following code to run and create a pdf, i had to allow iusr_<machinename> access to the DLL and the directory where i ran the file i saved the asp as "helloworld.asp", i wish there was some english documentation...

<!-- #INCLUDE FILE="../includes/modConstants.asp" -->
<!-- #INCLUDE FILE="../includes/modGeneral.asp" -->
< %
' HelloWorld script
' Part of fly2pdf
' Version: 1.0.0.0
' Author: Frank Heindörfer
' edited AndyDude
' Comments: This script creates a pdf file with the sentence 'Hello world.' using the the activex dll fly2pdf.

Const tFontSize = 12, x=10

Dim fso, WshShell, AppTitle, Scriptname, ScriptBasename
Dim doc, docFont, docPage, docFrame, docContent, pID, contID

Set fso = server.CreateObject("Scripting.FileSystemObject")

Scriptname = fso.GetFileName(Request.ServerVariables("SCRIPT_NAME"))
ScriptBasename = fso.GetFileName(Request.ServerVariables("SCRIPT_NAME"))

Set doc = Server.CreateObject("fly2pdf.clsDocument")

Set docPage = Server.CreateObject("fly2pdf.clsPage")
pID = doc.AddObject((docPage))

Set docFont = Server.CreateObject("fly2pdf.clsFont")
With docFont
.FontSubType = eFontSubType_Type1
.Name = eFontType1_Helvetica
End With
doc.AddObject (docFont)

Set docContent = Server.CreateObject("fly2pdf.clsContent")
docContent.Text "Hello world." & vbcrlf & now(), (docFont), (tFontSize), (x), docPage.Layout.Innerheight - PointsToMillimeters(tFontSize)
contID = doc.AddObject((docContent))
doc.AddObjectToPage CLng(pID), CLng(contID)

doc.CreateFile(server.mappath(fso.GetBaseName(ScriptBasename) & ".pdf"))

Set fso = nothing
Set docContent = nothing
Set docFont = nothing
Set docPage = nothing
Set doc = nothing
%>

© 2006 by pdfforge.org :: Contact us

Validate XHTML or CSS.