Page 2 of 3
Posted: Tue Mar 09, 2004 7:14 am
by clipper
Hallo Num3
OK- great, if I use a Library, only the functions I need are compiled.
But what´s about all the Global Vars for callfunctionfast() like FPMergeFiles.l when I use a library created with Tailbite? Are they all used in my *.EXE ?
regards
Clipper
Posted: Tue Mar 09, 2004 4:15 pm
by El_Choni
Yes, all globals are included, even if they are not used by your code. But you can't use those vars from the main code, only from the lib (I don't know if this is clear)
Posted: Tue Mar 09, 2004 4:36 pm
by clipper
Yes it´s clear that I can´t use this vars from the code.
If I build a lib containing this code:
Code: Select all
Global FPNewPage.l
Global FPSelectPage.l
FPNewPage = IsFunction(#PDFLIB, "iSEDNewPage")
FPSelectPage = IsFunction(#PDFLIB, "iSEDSelectPage")
ProcedureDLL.l iSEDNewPage()
ProcedureReturn CallFunctionFast(FPNewPage)
EndProcedure
ProcedureDLL.l iSEDSelectPage(PageNumber.l)
ProcedureReturn CallFunctionFast(FPSelectPage, PageNumber)
EndProcedure
and I write a program that only use the function iSEDNewPage, the
var FPSelectPage waste my memory. So if I had 50 Functions which I never used, the overhead increased.
Maybe it´s better to build this Library with Callfunction()
or a mix of both depending on how often I want to call them.
CallFunction(#PDFLIB,"iSEDUnlockKey",key)
regards
Clipper
Posted: Tue Mar 09, 2004 5:16 pm
by El_Choni
Anyway, would be:
Code: Select all
Global FPNewPage.l
Global FPSelectPage.l
#PDFLIB = 0
ProcedureDLL iSED_Init()
If OpenLibrary(#PDFLIB, "PDFLIB.DLL") ; or whatever the dll name is
FPNewPage = IsFunction(#PDFLIB, "iSEDNewPage")
FPSelectPage = IsFunction(#PDFLIB, "iSEDSelectPage")
EndIf
EndProcedure
ProcedureDLL.l iSEDNewPage()
ProcedureReturn CallFunctionFast(FPNewPage)
EndProcedure
ProcedureDLL.l iSEDSelectPage(PageNumber.l)
ProcedureReturn CallFunctionFast(FPSelectPage, PageNumber)
EndProcedure
If you have 50 not used functions, you would indeed waste 50*4 = 200 bytes. You can use CallFunction() to avoid it, but you know why CallFunctionFast() is named that way...

Posted: Tue Mar 09, 2004 6:30 pm
by clipper
Ok you´re right.
I only want to understand what´s going on when I build my own library with TAILBite.
by the way, thanks a lot for your effort in this tool

I want to create a PDF using UTF-8 with PDFLIB.COM
Posted: Sun Mar 12, 2006 12:40 am
by Yannoche
Hello,
I am using the iSEDQuickPDF 5.11 DLL version.
I want to create a PDF using UTF-8
My UTF-8 file contains Chineses characters, but in the PDF file created, it is not OK, there are just bad characters, not chinese.
So I want to try with pdflib (
www.pdflib.com) witch seem to support UTF-8
Does anyone has a sample to how to use pdflib with purebasic, and which version do I have to download from
www.pdflib.com
Thanks a lot,
Regards,
Yann
Re: I want to create a PDF using UTF-8 with PDFLIB.COM
Posted: Sat Jun 03, 2006 2:20 pm
by NoahPhense
Isn't there an example that is on the ised site?
- np
Posted: Sun Jun 04, 2006 4:40 am
by swan
Thats right, when you down loaded the dll version it has a PB example with it.
I guess you realise this is no longer supported - bit of a shame.
Posted: Sun Jun 04, 2006 3:37 pm
by NoahPhense
swan wrote:Thats right, when you down loaded the dll version it has a PB example with it.
I guess you realise this is no longer supported - bit of a shame.
Yeah, it's a shame. But I've learned that there isn't much you can't do
with their DLL.
As far as using the pdflib, and utf-8. I haven't messed with that.
Why aren't you able to use just the ised to make what you need?
- np
Posted: Mon Jun 05, 2006 12:18 am
by swan
@ np;
ised is getting a bit old now and has problems with later version pdf's. To be totally compatible we have to save out as version 4 from Acrobat. I only wish DynaPDF wasn't so expensive.
Posted: Mon Jun 05, 2006 2:29 am
by NoahPhense
swan wrote:@ np;
ised is getting a bit old now and has problems with later version pdf's. To be totally compatible we have to save out as version 4 from Acrobat. I only wish DynaPDF wasn't so expensive.
Yeah, that's a crazy price. Someone should write a pdf app in PB. I know
there is a lib, etc.. floating around being worked on. But something for the
long hall would be nice. Because I don't think pdf is ever going anywhere.
- np
Posted: Fri Jun 23, 2006 11:04 am
by Jan2004
Posted: Sun Jul 23, 2006 5:17 pm
by akj
I don't know whether anyone is interested but I have rewritten the file iSQP0511 OLD.pbi to be fully compatible with PureBasic version 4. This means it uses prototypes (for speed) and utilises doubles (for simplicity) without the need for any underlying hi/lo float structure as was previously necessary.
Also the iSQP0511 OLD.pbi file is now much smaller at 71KB compared with the original 137KB. There is scope for making it even smaller by using PureBasic macros.
There is just one minor shortcoming. If a library routine returns a string, PeekS() has to used. For example, instead of:
you have to write:
Posted: Mon Jul 24, 2006 4:33 am
by swan
@ akj
I'd be very interested, thank you.
Can U provide a link ?
Posted: Mon Jul 24, 2006 10:36 am
by akj
Hello Swan,
I don't have an available website of my own, the file is too large to simply post the text in this forum and I have forgotten how to make use of the uploading facility (PureSomething or the other) available to users of this forum. Do you know of somewhere I could upload the file? Or would you like me to email it to you as an attachment?
[Edited] I have now emailed the PB4 compatible version of iSQP0511.pbi to Swan after reducing the size still further to 38KB from an original size of 137KB.