PurePDF Version 2.0

Developed or developing a new product in PureBasic? Tell the world about it.
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

DoubleDutch wrote:I used to use some of the internal functions, such as : ipf_GetLMargin, ipf_GetRMargin, ipf_GetWidth, etc

Can these be made available as commands as the internal versions are not working (they are really useful).
on the list (maybe this weekend)
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Thanks. :D
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

here´s the update : PurePDF v2.13 http://www.purebasicpower.de/downloads/ ... 3_PB42.zip

changes :
- wrapped some internal commands to the outside (ipf_Get... to pdf_Get...)
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Thanks. :D
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Post by Thorsten1867 »

Bugfix:

Code: Select all

Procedure.s ipf_TruncateCell(w.f,h.f,Text$,border.w=0,Ln.f=0,Align$=#PDF_ALIGN_LEFT,Fill.f=0,Link.w=0,trunc$="...")
  Protected wMax.f, TLen.l
  If w = 0
    w = pdfW - pdfRMargin - pdfX
  EndIf
  wMax = w - (2 * pdfCMargin)
  If wMax < 0 : wMax = 0 : EndIf ; <=========
  If ipf_GetStringWidth(Text$) <= wMax
    ipf_Cell(w, h, Text$, border, Ln, Align$, Fill, Link)
  Else
    TLen = Len(Text$)
    While ipf_GetStringWidth(Left(Text$, TLen)+trunc$) > wMax
      TLen - 1
    Wend
    ipf_Cell(w, h, Left(Text$, TLen)+trunc$, border, Ln, Align$, Fill, Link)
    ProcedureReturn Right(Text$, Len(Text$)-TLen)
  EndIf
EndProcedure
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

@Thorsten1867 : its fixed, thanks.
Hurga
Enthusiast
Enthusiast
Posts: 148
Joined: Thu Jul 17, 2003 2:53 pm
Contact:

Post by Hurga »

Hello
AbbKlaus

I have a problem, that soem (most of the ?) Konstants are not known by the debugger (jaPBe)

i.e. #PDF_CELL_RIGHTBORDER, #PDF_ALIGN_CENTER

Did I do something wrong?
The res-file is in the residents dir...

Any suggestions?
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

Just tested jaPBe and had the same problem. Seems to me like a bug in jaPBe ?
Image
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Hello,
Hurga wrote:I have a problem, that soem (most of the ?) Konstants are not known by the debugger (jaPBe)
i.e. #PDF_CELL_RIGHTBORDER, #PDF_ALIGN_CENTER
What do you mean by 'constants are not known by the debugger' ?
I just installed the package, compiled this code :

Code: Select all

Debug #PDF_CELL_RIGHTBORDER
Output was -4, no compiler error.
ABBKlaus wrote:Just tested jaPBe and had the same problem. Seems to me like a bug in jaPBe ?
Could you elaborate please ?
If you mean the #PDF_* constants are not listed in the constants explorer, this is not a bug. The constants explorer uses an internal database and only shows WIN API constants.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

Hello Gnozal,

thanks for clarification, i think he means the ide-autocomplete feature.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

ABBKlaus wrote:Hello Gnozal,
thanks for clarification, i think he means the ide-autocomplete feature.
The autocompletion works here for the #PDF_* constants ?!
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Hurga
Enthusiast
Enthusiast
Posts: 148
Joined: Thu Jul 17, 2003 2:53 pm
Contact:

Post by Hurga »

That the strange thing...

Autocomplete works with the constants

when I try this:

Debug #PDF_CELL_RIGHTBORDER

then I got : Constant not found

As for me it seems not be a problem of jaPBe...

Strange...

//EDIT

Reinstalled 4.2 ->
Now it has an "division by zero" debugger error
in the example 6 (Table) in line "Savepdf..."
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

hmmm, tested here and all works as expected.
Do you have PureBasic 4.10 installed ?
If so, it has a higher priority and you have to change the PureBasic path manually. In jaPBe please go to File\Preferences -> General(TAB) -> PureBasic path and change it !

Regards Klaus
Hurga
Enthusiast
Enthusiast
Posts: 148
Joined: Thu Jul 17, 2003 2:53 pm
Contact:

Post by Hurga »

I used PB 4.2
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

does it work in the PB-IDE ?
Post Reply