It is currently Fri Jan 18, 2019 10:47 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 468 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12, 13 ... 32  Next
Author Message
 Post subject:
PostPosted: Thu Nov 13, 2008 8:22 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 31, 2005 11:09 pm
Posts: 3670
Location: Italy
Hi Klaus, you certainly already knows this, but in any case....

Currently the library does a lot of memory allocation without testing for an out of memory condition.

I did modify the code for the images-related routines because I use only that part in my code (I made a purepdf "light" of some kind actually, thanks to the source availability), so it would be probably useless to post a "patch" this time in this thread because all the library in reality would require such a treatment.

Basically, I added some

Code:
       
        pdfError = 99
        pdfErrorMessage$ = "Out of memory."
        vReturn = #False


if the return value of MEM_DataInit() is False.

What do you think ?

Bye and thank you.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Nov 18, 2008 11:27 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1143
Location: Germany
Thanks again luis,

changes are in :wink:

Quote:
- added new error code 17 = out of memory
- fixed ipf_Escape() for special characters like BS TAB LF FF CR ( )
- fixed GetTimeZoneInformation_() thanks to Rescator for his tip


Download for PB4.2 : http://www.purebasicpower.de/downloads/PurePDF214_PB42.zip
Download for PB4.30B4 : http://www.purebasicpower.de/downloads/PurePDF214_PB43X86.zip


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Nov 18, 2008 11:40 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 31, 2005 11:09 pm
Posts: 3670
Location: Italy
ABBKlaus wrote:
- added new error code 17 = out of memory


Wow, great, thank you :-)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 19, 2008 6:05 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 28, 2006 11:49 am
Posts: 145
Location: FRANCE
Hi ABBKLAUS,
Did you plan to use forms with PDF ?
Thanks,


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 12, 2008 8:01 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Apr 29, 2003 9:18 pm
Posts: 1459
Location: North by Northwest
There is a bug in this lib, when the second document is created the new orientation is ignored.

Code:
;###############################################
pdf_Create("L","mm",#PDF_PAGE_FORMAT_LETTER)
pdf_AliasNbPages();
pdf_AddPage()
pdf_Save("PageFormat Landscape.pdf")

;###############################################
pdf_Create("P","mm",#PDF_PAGE_FORMAT_LETTER)
pdf_AliasNbPages();
pdf_AddPage()
pdf_Save("PageFormat Portrait.pdf")


Using PB4.3beta5 with the PB4.3PurePDF library.

Thanks for looking into it.
fsw


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Dec 13, 2008 12:21 am 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1143
Location: Germany
fsw wrote:
There is a bug in this lib, when the second document is created the new orientation is ignored.

Thanks i found the bug, it was a missing ClearList(PagesF()).

Its now fixed, you have to redownload :wink:


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Dec 14, 2008 1:17 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 31, 2005 11:09 pm
Posts: 3670
Location: Italy
Hi Klaus, the proc below

Code:
  Procedure.b MEM_DataInit(*aData.MEM_DataStructure, aSize)
  Protected vReturn.b
  Protected vCurSize
  Protected vTmp
 
  ;aSize = (Int(aSize/64000)+1)*64000
  aSize=((aSize/64000)+1)*64000
 
  If *aData\pData = 0
    vCurSize = 0
    *aData\pData = AllocateMemory(aSize)
  Else
    vCurSize = *aData\lCurSize
    vTmp = ReAllocateMemory(*aData\pData, aSize)
    If vTmp <> 0 ; *aData\pData
      *aData\pData = vTmp
    EndIf 
  EndIf
   
  If *aData\pData = 0
    pdfError = 17
    vReturn = #False
  Else 
    *aData\lMaxSize = aSize
    *aData\lCurSize = vCurSize
    vReturn = #True
  EndIf 
 
  ProcedureReturn vReturn
EndProcedure


should be changed this way, I believe

Code:
Procedure.b MEM_DataInit(*aData.MEM_DataStructure, aSize)
  Protected vReturn.b
  Protected vCurSize
 
  ;aSize = (Int(aSize/64000)+1)*64000
  aSize=((aSize/64000)+1)*64000
 
  If *aData\pData = 0
    vCurSize = 0
    *aData\pData = AllocateMemory(aSize)
  Else
    vCurSize = *aData\lCurSize
    *aData\pData = ReAllocateMemory(*aData\pData, aSize)
  EndIf
   
  If *aData\pData = 0
    pdfError = 17
    vReturn = #False
  Else 
    *aData\lMaxSize = aSize
    *aData\lCurSize = vCurSize
    vReturn = #True
  EndIf 
 
  ProcedureReturn vReturn
EndProcedure



In the original code if the incoming *aData\pData is already allocated (not 0) and Realloc fails, the

Code:
pdfError = 17
vReturn = #False


is not executed.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Dec 16, 2008 8:38 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Apr 29, 2003 9:18 pm
Posts: 1459
Location: North by Northwest
ABBKlaus wrote:
fsw wrote:
There is a bug in this lib, when the second document is created the new orientation is ignored.

Thanks i found the bug, it was a missing ClearList(PagesF()).

Its now fixed, you have to redownload :wink:


@ Klaus:
It works again.
Thank you very much.

fsw


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 20, 2009 7:17 am 
Offline
Addict
Addict

Joined: Mon Apr 28, 2003 2:22 pm
Posts: 942
Location: Europe
Howdy Forum!

Ive got a little question regarding PurePDF. Is it possible to include "StringFields" which can be modified IN the PDF File as a form? (Like the StringGadget in PB for example)

_________________
Tranquil


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jun 25, 2009 10:48 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Jul 26, 2005 12:02 pm
Posts: 207
Location: Lieusaint (77), France
Hi all,

Is PurePDF 4.31 Pb compatible ?

_________________
Purebasic 5.70 64 bits - Windows 10 Pro 64 bits 1809


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Jun 29, 2009 12:32 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1143
Location: Germany
GG wrote:
Hi all,

Is PurePDF 4.31 Pb compatible ?
PB 4.31 is only a bugfix release, so yes it should work.

Regards Klaus


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 14, 2009 10:42 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1143
Location: Germany
Hi all,

i compiled PurePDF with the new PB4.40Beta1 (only to stop errors like 'SYS_AllocateString' :twisted: )

Please download here : http://www.purebasicpower.de/?download=PurePDF214_PB44X86.zip

Regards Klaus


Top
 Profile  
Reply with quote  
 Post subject: Re: PurePDF Version 2.0
PostPosted: Fri Feb 26, 2010 5:59 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1143
Location: Germany
Update : PurePdf version 2.15 for PureBasic 4.4x x86

  • fixed startxref now points at xref

Regards Klaus


Top
 Profile  
Reply with quote  
 Post subject: Error when compiling with PB 4.50 Beta 2
PostPosted: Mon Apr 05, 2010 6:33 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 28, 2006 11:49 am
Posts: 145
Location: FRANCE
Problem encountered with PB 450 beta 2 when compiling

POLINK Errror Unresolved external Symbol 'PB_CallFunctionFast'
POLINK Errror Unresolved external Symbol 'PB_CallFunctionFast2'
POLINK Errror Unresolved external Symbol 'Sys_FreeArray'
POLINK Errror Unresolved external Symbol 'Sys_AllocateArray'


Top
 Profile  
Reply with quote  
 Post subject: Re: PurePDF Version 2.0
PostPosted: Mon Apr 05, 2010 9:09 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1143
Location: Germany
Update : PurePdf version 2.15 for PureBasic 4.5x x86

Regards Klaus


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 468 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12, 13 ... 32  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye