It is currently Wed May 22, 2013 9:55 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 299 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 20  Next
Author Message
 Post subject: Re: PurePDF Version 2.0
PostPosted: Thu Aug 04, 2011 10:22 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 2853
Location: United Kingdom
Yep - I'd misread the code - sorry.

Overloading - With TailBite when i did XConsole I had this bit of code:

Code:
ProcedureDLL XOpenConsole()
  Flags=#PB_Window_TitleBar|#PB_Window_SystemMenu|#PB_Window_BorderLess|#PB_Window_SizeGadget|#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget
  CX=80
  CY=25
  FontH=24
  Intensity=128
  result=XGlobalOpenConsole(50,50,640,480,"ConsoleX")
  XGlobalConsoleColor(#MyWhite,#MyBlack)
  XGlobalClearConsole()
  ProcedureReturn result
EndProcedure

ProcedureDLL XOpenConsole2(sizex,sizey)
  Flags=#PB_Window_TitleBar|#PB_Window_SystemMenu|#PB_Window_BorderLess|#PB_Window_SizeGadget|#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget
  CX=sizex
  CY=sizey
  FontH=24
  Intensity=128
  result=XGlobalOpenConsole(50,50,640,480,"ConsoleX")
  XGlobalConsoleColor(#MyWhite,#MyBlack)
  XGlobalClearConsole()
  ProcedureReturn result
EndProcedure

ProcedureDLL XOpenConsole3(sizex,sizey,sized,fontname$,fontsize,title$)
  Itensity=128
  result=XFullOpenConsole(sizex,sizey,sized,fontname$,fontsize,title$)
  XGlobalConsoleColor(#MyWhite,#MyBlack)
  XGlobalClearConsole()
  ProcedureReturn result
EndProcedure
 
ProcedureDLL XOpenConsole4(sizex,sizey,x,y,w,h,title$)
  Flags=#PB_Window_TitleBar|#PB_Window_SystemMenu|#PB_Window_BorderLess|#PB_Window_SizeGadget|#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget
  CX=sizex
  CY=sizey
  FontH=24
  Intensity=128
  result=XGlobalOpenConsole(x,y,w,h,title$)
  XGlobalConsoleColor(#MyWhite,#MyBlack)
  XGlobalClearConsole()
  ProcedureReturn result
EndProcedure

ProcedureDLL XOpenConsole5(sizex,sizey,x,y,w,h,title$,Flgs)
  Flags=Flgs
  CX=sizex
  CY=sizey
  FontH=24
  Intensity=128
  result=XGlobalOpenConsole(x,y,w,h,title$)
  XGlobalConsoleColor(#MyWhite,#MyBlack)
  XGlobalClearConsole()
  ProcedureReturn result
EndProcedure


Look at console 3 and 4 parameters - they are different types - yet it worked! With the correct one being selected. It is like overloading on other systems.

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Thu Sep 15, 2011 11:53 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1069
Location: Germany
i finally made it work :lol:

Here´s a testversion of PurePDF that supports basic unicode capability´s :

http://www.purebasicpower.de/downloads/PurePDF.pb
http://www.purebasicpower.de/downloads/PurePDF_res.pb

And the example :

http://www.purebasicpower.de/downloads/Tutorial01%20Hello%20World.pb

Hint1 : You need to enable unicode mode in compilersettings ;-)
Hint2 : You must remove any versions of the PurePDF library before testing this one
Hint3 : Its now possible to use the PurePDF sources as includefile, just set #PurePDF_Include=1 and use IncludeFile "PurePDF.pb" to include it. The same technique is used in "Tutorial32 Unicode.pb"

BR Klaus

_________________
http://www.PureBasicPower.de


Last edited by ABBKlaus on Sun Oct 09, 2011 10:33 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Fri Sep 16, 2011 11:00 am 
Offline
Addict
Addict

Joined: Thu Nov 01, 2007 5:37 pm
Posts: 1565
Location: Germany
ABBKlaus wrote:
Hint3 : Its now possible to use the PurePDF sources as includefile, just set #PurePDF_Include=1 to something and it will be included
Does it mean I don't have to use it as a Userlib any longer? If so, thanks! :D


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Fri Sep 16, 2011 7:50 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 2853
Location: United Kingdom
ABBKlaus: Thanks for this, it's very useful. :D

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Fri Sep 16, 2011 8:27 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 2853
Location: United Kingdom
Possible bug, see screenshot:

http://xn--o-10a3f.com/images/purepdf.jpg

or

http://ɯoɔ.com/images/purepdf.jpg

The screen has the error line and the details from the debug window.

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Fri Sep 16, 2011 9:11 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1069
Location: Germany
c4s wrote:
Does it mean I don't have to use it as a Userlib any longer? If so, thanks! :D

Exactly !

DoubleDutch wrote:
ABBKlaus: Thanks for this, it's very useful. :D

Thanks

DoubleDutch wrote:
Possible bug, see screenshot:

Thanks for testing ! (It was due to the conversion from unsigned to long, i always forget to append &$FFFF)
its Fixed now, please redownload the sources

- fixed escaping of characters BS / TAB / LF / FF / CR / Backslash '\' / '(' / ')'
- fixed pdf_GetStringWidth() for unicode characters

BR Klaus

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Fri Sep 16, 2011 10:26 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 2853
Location: United Kingdom
Thanks for fixing it so quickly. :)

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Fri Sep 16, 2011 10:33 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 2853
Location: United Kingdom
Seems to work ok now.

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Sat Sep 17, 2011 12:35 am 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1069
Location: Germany
DoubleDutch wrote:
Thanks for fixing it so quickly. :)

You are welcome.

Just uploaded another version that should fix pdf_Cell / pdf_MultiCell

- added ipf_EscapeU / ipf_Escape is now obsolete
- fixed pdf_Cell
- fixed pdf_MultiCell

ToDo :

- add the /Ascent /Descent /CapHeight /ItalicAngle /StemV /MissingWidth paramters in ipf_PutFonts (they are fixed for now)
- replace the ipf_Get_CharWidth api with the new font functions ipf_TTF_*

BR Klaus

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Thu Sep 22, 2011 12:29 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1069
Location: Germany
update : PurePDF V2.21 with full unicode support

- fixed memory leak in ipf_LocalDecimal()
- updated ipf_Endian() procedures (Thanks to Rescator/skywalk/wilbert)
- updated ipf_GetStringWidth() is much faster now
- removed ipf_Get_CharWidth()
- added /Ascent /Descent /CapHeight /ItalicAngle /StemV /MissingWidth to unicode fonts
- fixed bug in ipf_EscapeU() when printing unicode strings like $010D where $0D has to be escaped
- removed the unicode parameter from pdf_SetFont() its now handled automatically when in unicode mode
- added unicode support to ipf_PutInfo()

http://www.purebasicpower.de/?download=PurePDF221_PB45X86.zip
http://www.purebasicpower.de/?download=PurePDF221_PB46X86.zip

BR Klaus

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Thu Sep 22, 2011 3:08 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
Hi Klaus,

I didn't realise that you'd added support for Unicode fonts - awesome!

How complete is the support for Unicode? I mean, are we limited to PDF 'standard fonts', or can we embed any old font?

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Thu Sep 22, 2011 4:05 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1069
Location: Germany
Hi Steven,

you can embed any Truetype font that has a cmap enty with format 4 encoding.

http://developer.apple.com/fonts/TTRefMan/RM06/Chap6cmap.html

[edit]You can check your fonts with this tool[/edit]

http://www.purebasicpower.de/downloads/TTF-Font-Checker.pb

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Fri Sep 23, 2011 3:35 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
I take it the entire font gets embedded into our resulting pdf files rather than subsets of the font?

Great job Klaus.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Fri Sep 23, 2011 4:25 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1069
Location: Germany
srod wrote:
I take it the entire font gets embedded into our resulting pdf files rather than subsets of the font?

Jep, it is based on the PHP-script DoubleDutch mentioned above. The font gets embedded plus a so called cidtogidmap (131072 Bytes) that maps unicode chars to glyphs.
This way you can encode all unicode characters.
I would advice you to use compression as show in Tutorial32 Unicode.pb

srod wrote:
Great job Klaus.

You are welcome

BR Klaus

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject: Re: PurePDF Version 2.0
PostPosted: Fri Oct 07, 2011 10:51 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1069
Location: Germany
Update :

- fixed bug in ipf_Cell() found by Malo

http://www.purebasicpower.de/?download=PurePDF221_PB45X86.zip
http://www.purebasicpower.de/?download=PurePDF221_PB46X86.zip

BR Klaus

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 299 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 20  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 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