PurePDF Version 2.0

Developed or developing a new product in PureBasic? Tell the world about it.
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Post by Tranquil »

Hi all!

Hope that PurePDF is still in develope couse I tried it today and fall in love with it. :)

Anyway, I think I found a bug. pdf_line() crashed with an invalid memory access every time. I'm not able to use this command in any way.

Downloaded the latest Version of purepdf from smollies.be Version 2.07.

This is what I tried:

Code: Select all

pdf_Create()
  pdf_AddPage("l")  
  pdf_SetFont("Arial","",12)
  pdf_Text(10,10,"Planung & Kontingente für den "+FormatDate("%dd.%mm.%yyyy",Date())+" Stand:"+FormatDate("%hh:%ii Uhr",Date()))
  pdf_SetFont("Arial","",9) 
  pdf_Text(10,14,"blablablabla")
  pdf_Save(curpath.s+"data/test.pdf")
  pdf_Line(10,16,10,16)
Tranquil
LuckyLuke
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Jun 06, 2003 2:41 pm
Location: Belgium

Post by LuckyLuke »

@Tranquil
Calling the pdf_Save function will close the document. So all other pdf_
functions should be called before this line.

Code: Select all

pdf_Create() 
  pdf_AddPage("l")  
  pdf_SetFont("Arial","",12) 
  pdf_Text(10,10,"Planung & Kontingente für den "+FormatDate("%dd.%mm.%yyyy",Date())+" Stand:"+FormatDate("%hh:%ii Uhr",Date())) 
  pdf_SetFont("Arial","",9) 
  pdf_Text(10,14,"blablablabla") 
  pdf_Line(10,16,10,16) 
  pdf_Save(curpath.s+"data/test.pdf") 
Regards,

LuckyLuke
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Post by Tranquil »

ARRGLLL!! What have I done there!?!? Damn, I'm so stupid. Forget it. Shame on me! And I began searching the source for bugs. :P

Thanks anyway LuckyLuke! Good work!!
Tranquil
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

new version is out :arrow: PurePDF V2.08

- small bugfix of PDF_BookMark (Thanks to Thorsten1867)

Regards Klaus
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

thank you ABBKlaus and Thorsten1867 for the update.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Post by Thorsten1867 »

Thanks a lot! Now the the bookmarks are working correctly. :D
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
bender-rulez
User
User
Posts: 49
Joined: Mon Mar 14, 2005 11:30 am

Post by bender-rulez »

Hi,

is there a Linux verison? FPDF also exist for Linux... :-)
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

@bender-rulez,

should work on linux too, but you have to strip some Windows API Functions :

Code: Select all

ipf_LocalDecimal()
ipf_Get_CharWidth()
ipf_Get_Font()
ipf_SetFontData()
  Case 3 ; Embed the Font <- must be removed
then you have a linux version without the font-embedding and a problem with the decimal separator !

Regards Klaus
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

just recompiled PurePDF with PB4.10 final, please redownload :!:

http://www.purebasicpower.de/?PurePDF

Regards Klaus
Marco2007
Enthusiast
Enthusiast
Posts: 648
Joined: Tue Jun 12, 2007 10:30 am
Location: not there...

Post by Marco2007 »

thanx, so much :D

The day I`ll just work with 4.10 is coming closer....
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

For all Beta-Testers :

PurePDF V2.09 for PB4.20 Beta 1
http://www.purebasicpower.de/?PurePDF

Regards Klaus
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Thanks, much appreciated. :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Post by fsw »

Somehow:

pdf_SetFont("Times","-B",12)
pdf_SetFont("Times","-I",12)

doesn't work, but

pdf_SetFont("Times","-U",12)

does.

While using "-B" the underline of an underlined text is bold, but not the text itself...
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

Crud... I poseted an error problem about Exelwriter... Sorry!
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

fsw wrote:Somehow:

pdf_SetFont("Times","-B",12)
pdf_SetFont("Times","-I",12)

doesn't work, but

pdf_SetFont("Times","-U",12)

does.

While using "-B" the underline of an underlined text is bold, but not the text itself...
Here´s the correct usage of pdf_SetFont() :

Code: Select all

pdf_SetFont(Family$ [, Style$ [, Size.b]])
pdf_SetFont("Times","",12) ; Regular
pdf_SetFont("Times","B",12) ; Bold
pdf_SetFont("Times","I",12) ; Italic
pdf_SetFont("Times","U",12) ; Underlined
pdf_SetFont("Times","BI",12) ; Bold+Italic
pdf_SetFont("Times","BIU",12) ; Bold+Italic+Underlined
Post Reply