iSEDQuickPDF Import

Share your advanced PureBasic knowledge/code with the community.
clipper
User
User
Posts: 44
Joined: Fri Aug 29, 2003 7:47 am
Location: Germany

Post 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
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post 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)
El_Choni
clipper
User
User
Posts: 44
Joined: Fri Aug 29, 2003 7:47 am
Location: Germany

Post 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
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post 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... ;)
El_Choni
clipper
User
User
Posts: 44
Joined: Fri Aug 29, 2003 7:47 am
Location: Germany

Post 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 :D
Yannoche
New User
New User
Posts: 2
Joined: Sun Oct 24, 2004 9:29 am

I want to create a PDF using UTF-8 with PDFLIB.COM

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

Re: I want to create a PDF using UTF-8 with PDFLIB.COM

Post by NoahPhense »

Isn't there an example that is on the ised site?

- np
swan
Enthusiast
Enthusiast
Posts: 226
Joined: Sat Jul 03, 2004 9:04 am
Location: Sydney Australia
Contact:

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

Post 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
swan
Enthusiast
Enthusiast
Posts: 226
Joined: Sat Jul 03, 2004 9:04 am
Location: Sydney Australia
Contact:

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

Post 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
Jan2004
Enthusiast
Enthusiast
Posts: 163
Joined: Fri Jan 07, 2005 7:17 pm

Post by Jan2004 »

May be this link interest you:
http://www.quickpdf.org/forum/forum_pos ... PN=1&TPN=1

Jan2004
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Post 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:

Code: Select all

text$ = iSEDGetPageText(0)
you have to write:

Code: Select all

text$ = PeekS(iSEDGetPageText(0))
Anthony Jordan
swan
Enthusiast
Enthusiast
Posts: 226
Joined: Sat Jul 03, 2004 9:04 am
Location: Sydney Australia
Contact:

Post by swan »

@ akj

I'd be very interested, thank you.
Can U provide a link ?
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Post 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.
Anthony Jordan
Post Reply