You are not logged in.
Pages: 1
Hi,
we are using SynPDF to create our PDF files in Delphi6.
Now we ported our applications to Delphi11 and we have a problem with the Font "Code 128" and "Code2of5interleaved"
In Delphi 6 we are using SynPDF 1.18 from 2013 and both Fonts are recognized as UNICODE in TPdfFontTrueType.Create and so fUnicode is TRUE for PrepareForSaving;
Both Fonts correctly implemented into the PDF.
but in the SynPDF version from 2022 both Fonts are not recognized as UNICODE and both Fonts displayed only as empty squares in any PDF Viewer.
Can anyone help what we are doing wrong?
Thx
Sven
Edit : for testing i used the old code from 2013 from synpdf in Delphi 11 and i have the same problem. somehow FindOrAddUsedWideChar isnt called in Delphi 11 in GetWideCharWidth.
where in my D6 project the font is added as unicode.
Last edited by SvenJ (2022-04-06 15:27:50)
Offline
Yes on the same Windows System.
Offline
Perhaps the
self := self.WinAnsiFont;
line was wrongly interpreted by the Delphi 11 compiler...
Do https://synopse.info/fossil/info/b711245224 fix your issue?
(I don't have Delphi 11 so I can't verify)
Offline
hey. no that doesnt help.
but i have a dirty solution that works.
the both fonts are not recognized as SymbolFonts. so i added following to the code and it works.
procedure TPdfWrite.AddUnicodeHexTextNoUniScribe(PW: PWideChar;
TTF: TPdfFontTrueType; NextLine: boolean; Canvas: TPdfCanvas);
var Ansi: integer;
isSymbolFont: Boolean;
begin
if TTF<>nil then begin
if TTF.UnicodeFont<>nil then isSymbolFont := TTF.UnicodeFont.fIsSymbolFont
else begin
isSymbolFont := TTF.fIsSymbolFont;
(* ------------------ > *)if TTF.fName = 'Code128' then isSymbolFont:=TRUE; // if Code128 then force isSymbolFont
end;
Offline
Could you check in TPdfTTF.Create why fIsSymbolFont := true is not set for your Code128 font on Delphi 11?
Are you sure the WideChar supplied for printing the barcode are correct?
How do you create the page?
Perhaps it is an encoding problem due to the Delphi Unicode.
Offline
Hey.
Could you check in TPdfTTF.Create why fIsSymbolFont := true is not set for your Code128 font on Delphi 11?
TPdfTTF.Create is never been called for that Font. its only been called when i add my change from above.
Are you sure the WideChar supplied for printing the barcode are correct?
how can i verify this?
How do you create the page?
we are using GMPrintSuite and draw onto TPDFDocumentGDI.vclcanvas
preview.p1.Pages[i].DrawToCanvas(lpdf.vclcanvas,SCREEN_PPI,SCREEN_PPI,false);
Offline
but in the SynPDF version from 2022 both Fonts are not recognized as UNICODE and both Fonts displayed only as empty squares in any PDF Viewer.
I had the same issue. See topic https://synopse.info/forum/viewtopic.php?pid=37219
This has been fixed in revision 211.
Maybe it works for you now too.
Offline
Pages: 1