StartDrawing(PDFOUTPUT())

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

StartDrawing(PDFOUTPUT())

Post 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!
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

There is a (cheap) dll available for PDF output.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post 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..
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post 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?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Just downloaded both and tried them.... and there is no pre-built DLL so, no cigar for both.... Arghhhh :(
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post 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!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
clipper
User
User
Posts: 44
Joined: Fri Aug 29, 2003 7:47 am
Location: Germany

Post 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
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post 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.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post 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..
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
clipper
User
User
Posts: 44
Joined: Fri Aug 29, 2003 7:47 am
Location: Germany

Post 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()
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post 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!!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Considering the low cost of iSEDQuickPDF, it would be nice to have it incorporated into PureBasic has a standard lib :D
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

interesting feature :)
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
Post Reply