iSEDQuickPDF Import

Share your advanced PureBasic knowledge/code with the community.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

iSEDQuickPDF Import

Post by Karbon »

Here is the .pbl file that will allow you to import the iSEDQuickPDF DLL available from http://www.sedtech.com/isedquickpdf/.

There are lots of doubles used in this DLL so remember you have to pass the Hi/Lo word to the function so what normally would be 1 argument to a function becomes 2 - this file takes all that into account..

I'll post the actual userlib that the DLLImport tool created over at www.purebasic.org pretty soon if anyone is interested - in the meantime you can roll your own :-)

[edit]

Scroll down and get the PBI file included with iSEDQuickPDf now - it's always up to date!

I'll make a new userlib for this soon for those that want it.
Last edited by Karbon on Thu Feb 26, 2004 3:18 am, edited 4 times in total.
-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
Fred
Administrator
Administrator
Posts: 18252
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Nice, I like this library !
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

I just finished an invoice generation program a few minutes ago that spits out PDFs using this DLL. I'm very very very pleased. I've used to the pdflib.com library but this one seems just as good and a LOT cheaper!

If anyone is interested in easily making PDFs in PB : http://www.sedtech.com/isedquickpdf/
-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
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

Thats sounds very interesting. Will have a look on it in the future.
Thanx for sharing the .pbi file.
regards,
benny!
-
pe0ple ar3 str4nge!!!
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

I've updated it several times so grab a new copy if you're using it.
-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
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

I posted the userlibs and such over at http://www.purebasic.org - pick 'em up if you need them..

Thanks to freedimension for that doubles userlib!
-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
sedtech
New User
New User
Posts: 1
Joined: Thu Feb 26, 2004 2:33 am
Location: South Africa
Contact:

iSEDQuickPDF import file

Post by sedtech »

PureBasic users,

We've put together an automatic PureBasic import file generator as part of our build process.

The latest version of iSEDQuickPDF (4.11) can be downloaded from our website. The iSQP0411DLL.zip archive contains an iSQP0411.pbi file which should work nicely with PureBasic. As per the original post the software can be downloaded from the iSEDQuickPDF Website

We've tested many of the iSEDQuickPDF functions using the evaluation edition of PureBasic, but did run into the 800-line limit so couldn't test the entire import file.

The import file allows simple programs like this to be written:

Code: Select all

IncludeFile "c:\isedquickpdf\iSQP0399.pbi"

OpenConsole()
iSEDInit("c:\isedquickpdf\")
PrintN(Str(iSEDUnlockKey(" ... license key here ... ")))
PrintN(Str(iSEDDrawText(100, 500, "Hello")))
PrintN(Str(iSEDSaveToFile("c:\pb.pdf")))
Input()
We would be interested to find out if there is any way we can improve this import file. As mentioned previously, the file itself is generated automatically as part of our build process so a fresh file will be available each time we release a new version of iSEDQuickPDF.

Looking forward to any feedback we may receive.

Regards,
Kevin

--
Kevin Newman
Managing Director
SEDTech (Pty) Ltd.
http://www.sedtech.com/isedquickpdf/
Last edited by sedtech on Thu Feb 26, 2004 11:28 am, edited 1 time in total.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

I can't say enough good things about this library - I've really put it through it's paces (from PB) and have been VERY impressed so far..

Sedtech: I will be testing the include file like crazy as I move away from my hackish solution to your more elegant one.

The only thing right off the bat that might be useful is to get the address of the functions using PB's IsFunction() procedure so that the CallFunction() calls can become CallFunctionFast() calls. In tests there is a measurable performance increase.

I'd be happy to do and send the result if you can't or don't want to!

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
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

PDF LIB LIBRARY

Post by NoahPhense »

Fred wrote:Nice, I like this library !
The latest release.. 4.11 was released today.

I've been communicating with Doug over there, I purchased this a while
back to create a pdf app for work, using PB.

He created this and it is now included with all future releases.


Here is only a sample.. as the forums will not take the whole .pbi

Code: Select all

;======================================================================================
;iSEDQuickPDF 4.11
;PureBasic header file
;26 February 2004
;http://www.sedtech.com/isedquickpdf
;======================================================================================

#ISQP=1
Structure iSQPDouble
Hi.l
Lo.l
EndStructure
Procedure MakeiSQPDouble(LONG.f, ADDRESS.l)
  !FLD dword [ Esp ]
  !MOV dword Eax, [ Esp + 4 ]
  !FSTP qword [ Eax ]
EndProcedure
Procedure.f CatchDoubleReturn(*x.iSQPDouble)
  !MOV  dword EAX,[ESP]
  !FST  qword [EAX]
  !MOV  dword EAX,[ESP]
  !FLD  qword [EAX]
EndProcedure
Procedure iSEDInit(Path.s)
  OpenLibrary(#ISQP, Path + "iSEDQuickPDF.dll");
EndProcedure
Procedure.l iSEDAddLinkToJavaScript(Left.f, Top.f, Width.f, Height.f, JavaScript.s, Options.l)
  dLeft.iSQPDouble
  dTop.iSQPDouble
  dWidth.iSQPDouble
  dHeight.iSQPDouble
  MakeiSQPDouble(Left.f, @dLeft)
  MakeiSQPDouble(Top.f, @dTop)
  MakeiSQPDouble(Width.f, @dWidth)
  MakeiSQPDouble(Height.f, @dHeight)
  ProcedureReturn CallFunction(#ISQP, "iSEDAddLinkToJavaScript", dLeft\Hi, dLeft\Lo, dTop\Hi, dTop\Lo, dWidth\Hi, dWidth\Lo, dHeight\Hi, dHeight\Lo, JavaScript, Options)
EndProcedure
Procedure.l iSEDAddLinkToPage(Left.f, Top.f, Width.f, Height.f, Page.l, Position.f, Options.l)
  dLeft.iSQPDouble
  dTop.iSQPDouble
  dWidth.iSQPDouble
  dHeight.iSQPDouble
  dPosition.iSQPDouble
  MakeiSQPDouble(Left.f, @dLeft)
  MakeiSQPDouble(Top.f, @dTop)
  MakeiSQPDouble(Width.f, @dWidth)
  MakeiSQPDouble(Height.f, @dHeight)
  MakeiSQPDouble(Position.f, @dPosition)
  ProcedureReturn CallFunction(#ISQP, "iSEDAddLinkToPage", dLeft\Hi, dLeft\Lo, dTop\Hi, dTop\Lo, dWidth\Hi, dWidth\Lo, dHeight\Hi, dHeight\Lo, Page, dPosition\Hi, dPosition\Lo, Options)
EndProcedure
Procedure.l iSEDAddLinkToWeb(Left.f, Top.f, Width.f, Height.f, Link.s, Options.l)
  dLeft.iSQPDouble
  dTop.iSQPDouble
  dWidth.iSQPDouble
  dHeight.iSQPDouble
  MakeiSQPDouble(Left.f, @dLeft)
  MakeiSQPDouble(Top.f, @dTop)
  MakeiSQPDouble(Width.f, @dWidth)
  MakeiSQPDouble(Height.f, @dHeight)
  ProcedureReturn CallFunction(#ISQP, "iSEDAddLinkToWeb", dLeft\Hi, dLeft\Lo, dTop\Hi, dTop\Lo, dWidth\Hi, dWidth\Lo, dHeight\Hi, dHeight\Lo, Link, Options)
EndProcedure
; Too many paramters for AddNoteAnnotation
Procedure.s iSEDGetCatalogInformation(Key.s)
  r.l = CallFunction(#ISQP, "iSEDGetCatalogInformation", Key)
  s.l = CallFunction(#ISQP, "iSEDStringResultLength")
  ProcedureReturn PeekS(r, s)
EndProcedure
Procedure.l iSEDSetCatalogInformation(Key.s, NewValue.s)
  ProcedureReturn CallFunction(#ISQP, "iSEDSetCatalogInformation", Key, NewValue)
EndProcedure
Procedure.l iSEDGetDestPage(DestID.l)
  ProcedureReturn CallFunction(#ISQP, "iSEDGetDestPage", DestID)
EndProcedure
Procedure.l iSEDGetDestType(DestID.l)
  ProcedureReturn CallFunction(#ISQP, "iSEDGetDestType", DestID)
EndProcedure
Procedure.f iSEDGetDestValue(DestID.l, ValueKey.l)
  CallFunction(#ISQP, "iSEDGetDestValue", DestID, ValueKey)
  ProcedureReturn CatchDoubleReturn(dummy.iSQPDouble)
EndProcedure
Procedure.l iSEDCompressContent()
  ProcedureReturn CallFunction(#ISQP, "iSEDCompressContent")
EndProcedure
Procedure.l iSEDCompressPage()
  ProcedureReturn CallFunction(#ISQP, "iSEDCompressPage")
EndProcedure
Procedure.l iSEDDocumentCount()
  ProcedureReturn CallFunction(#ISQP, "iSEDDocumentCount")
EndProcedure
Procedure.l iSEDDocumentID(Index.l)
  ProcedureReturn CallFunction(#ISQP, "iSEDDocumentID", Index)
EndProcedure

This library kicks as$ .. trust me. And their support is outrageous.
Once you are a paying user, you have your OWN forum, where you
deal ONE-ON-ONE with a tech.. it couldn't be any better..

- np

ps - this file is now included in the 4.11 release.. the import file has 1450
lines of code in it... ;)
clipper
User
User
Posts: 44
Joined: Fri Aug 29, 2003 7:47 am
Location: Germany

Post by clipper »

Hallo sedtech,

great library and thanks for PB-support with your import file!!

To reduce Overhead in my PB-Software, I take your
include, copy the functions I need and paste them in a new, shorter includefile.
At this point it would be very nice if you put the
FPxxxx = IsFunction(#ISQP, "iSEDxxxx")
together with the corresponding function.

iSEDQuickPDF offers so many functions :D so that it´s very hard to find
them in the large include.

what do you thin about this
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Here's a more complex example :

Code: Select all

IncludeFile "iSQP0412.pbi"

OpenConsole()

iSEDInit("")
PrintN(Str(iSEDUnlockKey(" ... license key here ... ")))
PrintN(Str(iSEDDrawTextBox(100, 500, 150,80,"Hello World.... this actually works out very well!!!",0)))
PrintN(Str(iSEDDrawBarcode(100, 700, 150,20,"Barcode",1,0)))
PrintN(Str( iSEDDrawBox(80,500,250,180,0 )))
PrintN(Str(iSEDCompressPage())) ; Compress this PDF page to save space
perm.l=iSEDPermissions(1,0,0,0,0,0,0,1) ; Generate permission number
PrintN(Str(iSEDEncrypt("purebasic01","",0,perm))) ; Apply Encriptation and permissions
PrintN(Str(iSEDSaveToFile("pb.pdf")))

Input()
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Just has a note, I've created a Purebasic UserLibrary for this DLL.

I just edited the include PBI file and used TAILBite to convert it to a Library...

Worked like a charm :mrgreen:
User avatar
blueb
Addict
Addict
Posts: 1116
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Post by blueb »

Num 3,

What changes did you have to make to the PBI file?

Since I recently installed TailBite, I'd also be interested in making a lib. As I understand, libs only include the functions you need at compile time. Therefore clipper would not need to cut and paste to get a smaller include file.


Thanks in advance,
blueb
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

I changed all procedures like this:

Original

Code: Select all

Procedure.l iSEDMergeFiles(FirstFileName.s, SecondFileName.s, OutputFileName.s)
  ProcedureReturn CallFunctionFast(FPMergeFiles, FirstFileName, SecondFileName, OutputFileName)
EndProcedure
New

Code: Select all

ProcedureDLL.l PDF_MergeFiles(FirstFileName.s, SecondFileName.s, OutputFileName.s)
  ProcedureReturn CallFunctionFast(FPMergeFiles, FirstFileName, SecondFileName, OutputFileName)
EndProcedure
Afterwords i runned tailbite on it :D
User avatar
blueb
Addict
Addict
Posts: 1116
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Post by blueb »

Thanks Num3,

I'll give that a try. :)

blueb
Post Reply