Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiCell error #8

Open
limelect opened this issue Jul 22, 2023 · 11 comments
Open

MultiCell error #8

limelect opened this issue Jul 22, 2023 · 11 comments

Comments

@limelect
Copy link

MultiCell error

  • Hebrew characters not working

D10.2.3
I don't feel like debugging

@dopidaniel
Copy link
Contributor

Can you please attach a small Project to reproduce the problem?

And a Print Screen showing what is wrong and how it should be...

@limelect
Copy link
Author

using this demofpdfpascal demo
Screenshot - 23_07_2023 , 09_30_57
Screenshot - 23_07_2023 , 09_36_35
Screenshot - 23_07_2023 , 09_38_45
i Added to the title HEBREW PageTitle := 'שלמה FPDF Pascal - Index, Links Test';
and as you see also problem

P.S I used TMS pdf printer they have in my case hebrew that I fixed
and TAB that I did not fix yet

@limelect
Copy link
Author

limelect commented Jul 23, 2023

on line 1458 somewhere in the loop while (i <= nb) do
since I have my project I leave it to you
as for Hebrew it is another matter

@dopidaniel
Copy link
Contributor

Can you please update and try again ?

We merged some changes and fixes from @arimateia

@dopidaniel
Copy link
Contributor

dopidaniel commented Jul 26, 2023

We investigate, and probably its VERY hard to fix it now..

  • Current version of FPDF Pascal, does not suporte external TTF font files
  • We don´t suport UTF8, inside the PDF, all UTF is converted do ANSI CP1252
function TFPDF.ConvertTextToAnsi(const AText: String): String;
begin
  if Self.UseUTF8 then
    Result := Utf8ToAnsi(AText)
  else
    Result := AText;
end;

We find these topic, with same problem:
https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-display-hebrew-text-in-pdf-from-my-custom/m-p/1011992#M14337

@limelect
Copy link
Author

Sti;; error in loop

@limelect
Copy link
Author

limelect commented Jul 28, 2023

Ok i did this for you very old trick
first add this

First := True;
while (i <= nb) do
begin
  // Get next character
  if i=328 then<<<
  c:=#20;<<  BP here then single step

Then it breaks on
l := l + cw[ord(c)];
line 1500\

Ok the char in c is '₪'<<<
I suspect is is out of the array

@limelect
Copy link
Author

limelect commented Jul 28, 2023

Ok i fixed your problem by adding

 if ord(c)<266 then  <<<<<<<<<<<<

l := l + cw[ord(c)];

NOW !!! fix the HEBREW PROBLEM as I do not have time to fix all the problems of the world
Or I will find one day time

P.S I am on huge new project which will take many month to develop

@dopidaniel
Copy link
Contributor

Please submit a Pull Request or attach the changed files

@limelect
Copy link
Author

limelect commented Jul 29, 2023

FPDF-Pascal-main.zip
Compare yours and mine
Changes on line 1499

@dopidaniel
Copy link
Contributor

Are you sure you attached the changed files ?
I didn't realize your changes on sources in Zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants