You are not logged in.
Hi
I'm using the last update of the library (download it today).
The is an issue with Hebrew/Arabic string with numbers/English characters inside.
Here is the export code:
procedure TForm15.PdfDocumentClick(Sender: TObject);
var
ppdf : TPdfDocument;
pagemeta : TMetafile;
p : integer;
begin
Application.CreateForm(tForm16,Form16);
form16.ADODataSet1.Open;
ppdf := TPdfDocumentGDI.Create;
ppdf.EmbeddedTTF:=true;
pPdf.UseUniscribe:=True;
form16.QuickRep1.prepare;
for p := 1 to form16.QuickRep1.QRPrinter.PageCount do
begin
pagemeta := form16.QuickRep1.QRPrinter.GetPage(p);
try
pPdf.DefaultPageWidth := MulDiv(pagemeta.Width,72,pPdf.ScreenLogPixels);
pPdf.DefaultPageHeight := MulDiv(pagemeta.Height,72,pPdf.ScreenLogPixels);
pPdf.AddPage;
// draw the page content
pPdf.Canvas.RenderMetaFile(pagemeta,1,0,0);//
finally
pagemeta.Free;
end;
end;
ppdf.SaveToFile('c:\temp\PdfDocument.pdf');
ppdf.free;
end;
for examples if i tried to export the string: יום א 26/06/2022 10:00:02
it exported ok if bidimode is LeftToRight, but wrong if it's RightToLeft as it should be.
If I change the code to
AScriptState.uBidiLevel := 0;
then it's ok, but still there are other issues like this:
This is how it's looking when
AScriptState.uBidiLevel := 1;
Any help about create PDF correctly in Hebrew/Arabic ?
Shraga
Last edited by shragam (2022-06-27 05:03:46)
Offline
Hi, Any Help about it ?
Offline
Is the output from UniScribe correct in the debugger?
(i.e. are the glyph blocks correct?)Could you try with another font?
The output is wrong if UniScribe =true.
If it's false, than the Hebrew/Arabic strings are in reverse order.
This is how I'm working now. I reverse it and it shows ok, but there are issues with the alignment.
I'm using Times New Roman and Tahoma fonts in the demo.
I changed to Segoe UI with no success.
They are global fonts, it should not happened.
Shraga
Offline
Hi ab
Any updates or direction how to solve it ?
Thanks
Offline
Hi
Is there any solution for this ?
Offline