Page 1 of 2
StartDrawing(PDFOUTPUT())
Posted: Sat Oct 11, 2003 1:41 pm
by Num3
Ok, ok.... It's just a request...
Has i posted earlier Open Office 1.3 has this function integrated on it.
Has the source for it is available for free, maybe someone can use it to create this function. No other programming language has this available and I believe this one would be a knock out for the competititon!
Posted: Sat Oct 11, 2003 1:44 pm
by Edwin Knoppert
There is a (cheap) dll available for PDF output.
Posted: Sat Oct 11, 2003 6:02 pm
by Karbon
Which PDF library do you like? I'm looking at a bunch right now and can't really decide.. I've been using PDFlib (
www.pdflib.com) for web applications but I sort of bumped heads with a few perople over there so I'm looking for an alternative..
Posted: Sat Oct 11, 2003 6:13 pm
by Num3
Posted: Sat Oct 11, 2003 6:26 pm
by Karbon
I'd seen the first before but it's GPL... The second has a better license but doesn't seem to support much.. Have you tried either?
Posted: Sat Oct 11, 2003 7:06 pm
by Num3
Just downloaded both and tried them.... and there is no pre-built DLL so, no cigar for both.... Arghhhh

Posted: Sun Oct 12, 2003 9:41 am
by Edwin Knoppert
Posted: Sun Oct 12, 2003 4:45 pm
by Karbon
That looks promising - they even offer up the source code at a very resonable price!
I think I'll give it a try!
Posted: Sun Oct 12, 2003 5:41 pm
by clipper
Yes, IsedQuickpdf is a very great Lib for generating PDF-Files from
code. Cheap, good support.
But maybe someone has time to bring this PHP-Class:
to PB
http://www.fpdf.org
Posted: Sun Oct 12, 2003 7:36 pm
by Edwin Knoppert
Btw,
Maybe not your goal but i have a Ghostscript printer thingy on my site named MyPDF.
This will aut. create PDF using a PS printerdriver.
Posted: Mon Oct 13, 2003 3:00 am
by Karbon
Does anyone have an IsedQuickpdf example in PureBasic I could take a look at?
I'm getting the new document fine but drawing text doesn't seem to get me anything.. I used the Double lib from the resources site to pass the double type variables into the DrawText function - that might be the problem..
Posted: Mon Oct 13, 2003 4:30 am
by clipper
Hallo Karbon, here is a little example.
Remember you have to insert your Licence key in "iSEDUnlockKey" (Demo-Key available)
Code: Select all
; ------------------------------------------------------------
;
; Example for creating PDF-Files with iSEDQuickPDF
; http://www.sedtech.com/isedquickpdf/
; DLL edition
; Author Thomas Ott
; ------------------------------------------------------------
#PDFLIB=1
Structure VBdouble
Hi.f
Lo.f
EndStructure
Procedure MakeDouble( LONG.f, ADDRESS.l )
!FLD dword [ Esp ]
!MOV dword Eax, [ Esp + 4 ]
!FSTP qword [ Eax ]
EndProcedure
Procedure PDFInit()
If OpenLibrary(#PDFLIB,"iSEDQuickPDF.dll")
CallFunction(#PDFLIB,"iSEDUnlockKey","Your key here")
CallFunction(#PDFLIB,"iSEDSetMeasurementUnits",1)
CallFunction(#PDFLIB,"iSEDSetOrigin",1)
CallFunction(#PDFLIB,"iSEDSetInformation",5,"PureBasic PDF-Generation")
Else
MessageRequester("Error", "Error loading PDF-Library", #MB_IconError | #MB_OK)
End
EndIf
EndProcedure
Procedure PDFDrawText(left.f,top.f,text.s)
x.VBdouble
y.VBdouble
MakeDouble( left.f, @x )
MakeDouble( top.f, @y )
ProcedureReturn CallFunction(#PDFLIB,"iSEDDrawText",x\Hi,x\Lo,y\Hi,y\Lo ,text)
EndProcedure
Procedure PDFSetInformation(Info.l,text.s)
CallFunction(#PDFLIB,"iSEDSetInformation",Info,text)
EndProcedure
Procedure PDFSetPageDimensions(width.f,height.f)
x.VBdouble
y.VBdouble
MakeDouble( width.f, @x )
MakeDouble( height.f, @y )
ProcedureReturn CallFunction(#PDFLIB,"iSEDSetPageDimensions",x\Hi,x\Lo,y\Hi,y\Lo)
EndProcedure
Procedure PDFSave(filename.s)
ProcedureReturn CallFunction(#PDFLIB,"iSEDSaveToFile",filename)
EndProcedure
Procedure PDFShutDown()
CloseLibrary(#PDFLIB)
EndProcedure
PDFInit()
PDFSetPageDimensions(210,297)
PDFSetInformation(1,"From me")
PDFDrawText(100,100,"Hello world")
PDFSave("c:\helloworld.pdf")
PDFShutDown()
Posted: Mon Oct 13, 2003 3:13 pm
by Karbon
Right after I posted that I remembered someone showing some passing-doubles-to-dll-functions tricks and went and looked it up..
Thanks!!
Posted: Mon Mar 22, 2004 6:18 pm
by Num3
Considering the low cost of iSEDQuickPDF, it would be nice to have it incorporated into PureBasic has a standard lib

Posted: Sun Mar 28, 2004 2:44 am
by eddy
interesting feature
