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

Re: PurePDF Version 2.0

Post by ABBKlaus »

Thanks DoubleDutch, changes are now included.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: PurePDF Version 2.0

Post by DoubleDutch »

no problem, glad to have helped. :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
loulou
User
User
Posts: 38
Joined: Tue Dec 08, 2009 7:42 am

Re: PurePDF Version 2.0

Post by loulou »

hi ABBKLAUS,
where tofind the new corrected version ? Thanks in advance
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PurePDF Version 2.0

Post by IdeasVacuum »

IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Seldon
Enthusiast
Enthusiast
Posts: 405
Joined: Fri Aug 22, 2003 7:12 am
Location: Italia

pdf_Write() bug ?

Post by Seldon »

It seems I've found a bug that affects the latest version for 4.60 compiler. pdf_Write() doesn't upgrade the current cursor position, so consequent calls to pdf_Write() will cause your text to start always at same position. While in the manual it states: 'Upon method exit, the current position is left
just at the end of the text'.
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: PurePDF Version 2.0

Post by ABBKlaus »

Its a bug in ipf_Write(), i will upload a corrected version later :wink:

Wrong :

Code: Select all

    l + ipf_GetStringWidth(c) ; Fonts()\CharWidth[Asc(c)]
Corrected :

Code: Select all

    l + ipf_GetStringWidth(c,#False) ; Fonts()\CharWidth[Asc(c)]
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: PurePDF Version 2.0

Post by ABBKlaus »

Seldon
Enthusiast
Enthusiast
Posts: 405
Joined: Fri Aug 22, 2003 7:12 am
Location: Italia

Re: PurePDF Version 2.0

Post by Seldon »

ABBKlaus wrote:Update :
- fixed the PDF_Write() command (Thanks to Seldon)
Thank you !
Oliver13
User
User
Posts: 90
Joined: Thu Sep 30, 2010 6:40 am

Re: PurePDF Version 2.0

Post by Oliver13 »

Hello,

I just wonder whether it is possible to implement WMF/EMF files with PurePDF ?

If not:
There is an extension available on the FPDF site
(http://www.fpdf.org/en/script/script55.php), it would be great, if this could be included in a next version.

TX
Oli
michel
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Feb 19, 2007 5:47 pm
Location: Luxemburg

arrows

Post by michel »

Hi ABBKLAUS,

Do you see any possibility to implement the arrow command in the library?

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

Re: PurePDF Version 2.0

Post by ABBKlaus »

Thanks for the info Oliver13, if i have some freetime i will see what i can do.

michel what the hell is an "arrow" command ?
michel
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Feb 19, 2007 5:47 pm
Location: Luxemburg

Re: PurePDF Version 2.0

Post by michel »

Hi ABBKlaus,

I have to draw in pdf "simplest" geometric forms which I want to show with dimension lines. These should have arrows at both ends.

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

Re: PurePDF Version 2.0

Post by ABBKlaus »

michel you can already do this with the path commands, here is a simple example that draws a red arrow :

Code: Select all

pdf_Create()
pdf_AddPage()

Procedure Arrow(x.f,y.f,Length.f,ArrowSize.f,Style.s=#PDF_STYLE_DRAW)
  
  pdf_PathBegin(x,y)
  pdf_PathLine(x+Length-ArrowSize,y) ; 1
  pdf_PathLine(x+Length-ArrowSize,y-ArrowSize) ; 2
  pdf_PathLine(x+Length+ArrowSize,y+ArrowSize/2) ; 3
  pdf_PathLine(x+Length-ArrowSize,y+ArrowSize*2) ; 4
  pdf_PathLine(x+Length-ArrowSize,y+ArrowSize) ; 5
  pdf_PathLine(x,y+ArrowSize)
  
  pdf_PathEnd(Style)
EndProcedure

Color=#Red
pdf_SetFillColor(Red(Color),Green(Color),Blue(Color))
Arrow(20,20,50,2,#PDF_STYLE_DRAWANDFILL)

pdf_Save("Arrow.pdf")
RunProgram("Arrow.pdf")
michel
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Feb 19, 2007 5:47 pm
Location: Luxemburg

Re: PurePDF Version 2.0

Post by michel »

Hi ABBKlaus,

Thank you for the example. I didn't percieve the power and possibilities of the path commands.

michel
User avatar
Guimauve
Enthusiast
Enthusiast
Posts: 742
Joined: Wed Oct 22, 2003 2:51 am
Location: Canada

Re: PurePDF Version 2.0

Post by Guimauve »

Hello,

I would like to use PurePDF on Linux but apparently the "FIXED" structure is used twice in the TTF_post_Header structure definition is not define in Linux.

Can someone put a copy of this structure here, so I can add it and compile PurePDF in Linux.

Thanks beforehand and best regards.
Guimauve
Post Reply