* * *

Author Topic: "Free JPDF Pascal" STABLE VERSION 1.0 - Reports in PDF - Desktop, Mobile and CGI  (Read 48192 times)

Leledumbo

  • Hero Member
  • *****
  • Posts: 7971
  • Programming + Glam Metal + Tae Kwon Do = Me
Quote
Is it compatible with these versions of Lazarus / FPC is not possible constants
to define in a class?
For a reference I would be very grateful.
No, probably an:
Code: [Select]
{$IF FPC_FULLVERSION < 20600}
  {$ERROR FPC 2.6.0 or greater required!}
{$ENDIF}
Would be good. Here's the reference.

velissariouc

  • New member
  • *
  • Posts: 10
As an alternative solution there is the Haru library http://libharu.org/wiki/Downloads#Windows_Binaries
It is writen in C so I guess it's fast and gives pascal files with the external declaration of the C functions.

Blestan

  • Sr. Member
  • ****
  • Posts: 461
Constants definitions in the class are not essential for the code to run ...
As i mentioned in an early post i'm rewriting the code of the lib because it's very very poorly ported from php ... so i day or to i will post it on github
it should run on most fpc versions
Speak postscript or die!
Translate to pdf and live!

martinrame

  • Jr. Member
  • **
  • Posts: 59
Hi Blestan, did you create an GitHub account to see your code?.

GioFer

  • Newbie
  • Posts: 1


- New method to create Code25 barcodes for bank bills (see example);

First of all.......

Thank you för the wonderful job!

Second.......

Are you going to implement BarCode128?

They are the standard at our hospitals here in Sweden.

Best regards!

Pierre

  • New member
  • *
  • Posts: 5
    • My Lazarus web site
Hi,

Great job :)

Just some remarks:
- in order to override the header function you need to add "virtual" in the declaration
  =>  procedure Header; virtual;
- the same for the footer  =>  procedure Footer; virtual;
- There is a small bug in SetY. "if (cpY >= 0) then"  must be replace with "if (vY >= 0) then".  With this modification it's possible to use a negative value for Y.

Is it possible to change the line type? It seems that it's not possible...

Pierre
--
Pierre

Pierre

  • New member
  • *
  • Posts: 5
    • My Lazarus web site
One more thing.

Replace "procedure AliasNbPages(vAlias: string = '/{nb/}');" by "procedure AliasNbPages(vAlias: string = '{nb}');"

"/" isn't necessary. This is a PHP constraint. Like that you can use "{nb}" as the default alias for the total number of page.
--
Pierre

Pierre

  • New member
  • *
  • Posts: 5
    • My Lazarus web site
I have the answer for my question about changing the style of lines. I found the solution in FPDF website (code from yukihiro_o converted by me).
Add the following code to the library:
Code: [Select]
Interface:
Procedure SetDash(black: double = 0.0; white:double = 0.0);

Code:
Procedure TJPFpdf.SetDash(black: double; white:double);
Var s:string;
begin
  if(black<>0) then
    s:=format('[%.3F %.3F] 0 d',[black*pgk,white*pgk],TPDFFormatSetings)
  else
    s:='[] 0 d';
  _out(s);
end;


example of use:
SetDash(0.1,0.2);
Draw the next lines with small dash.
« Last Edit: February 12, 2013, 10:50:31 am by Pierre »
--
Pierre

nomorelogic

  • Full Member
  • ***
  • Posts: 110
Compiling progjpfpdf.lpr using heaptrc, I've found 2 lacks of memory in libjpfpdf.

So I've patched libjpfpdf (search for 'nomorelogic' in attachment to find 2 patches).

I wanted to suggest this patch in https://github.com/jepafi/Free-JPDF-Pascal, but if I understand it, to do this I should do a fork on git!?  :o

kpeters58

  • Sr. Member
  • ****
  • Posts: 256
GetStringWidth broken?
« Reply #24 on: January 12, 2014, 05:34:55 am »
It seems to me that GetStringWidth is broken in V1.33 (Of course, there is always a chance that there's something I didn't quite get...)

Can someone confirm this?

Lazarus 1.4.4/FPC 2.6.4/Win 32  (on Win 10/64 bit)

eldonfsr

  • Full Member
  • ***
  • Posts: 118
I Compile this lib but send me a error UTF8toUTF16 not foun some body has a new version wich include this function.


Thanks.

Blestan

  • Sr. Member
  • ****
  • Posts: 461
just include lazuft8 unit in the uses ....

Speak postscript or die!
Translate to pdf and live!

eldonfsr

  • Full Member
  • ***
  • Posts: 118
Thanks for your replay but dosn't work i checked PDFLIb folder don exists any file with such name y send me massage can't find lazuft8.

lazutf8 is not part of lazarus?

thanks.

engkin

  • Hero Member
  • *****
  • Posts: 2117
You should find UTF8toUTF16 in one or both of LCLProc and LazUTF8.
LCLProc: Lazarus\LCL\lclproc.pas
LazUTF8: Lazarus\components\lazutils\lazutf8.pas

kitsaros

  • New member
  • *
  • Posts: 27
do you have any luck using unicode ?
Using SetUTF8(true);   does not seem to work :(

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus