bzwirs 4 Posted December 13, 2022 Delphi 11.2 Winsoft PDFium In app for Windows and Android I am using PDFium to create an invoice as a PDF. Included In the PDF are 2 lines of text that are colored red and one rectangle filled with color blue. Using PDFium I need to use TAlphaColorRec.Red and TAlphaColorRec.Blue to display the color on the PDF. This works fine on Windows but when compiled for Android the text colour shows as blue and the rectangle fill color is red (ie. opposite of the selected colors). Reversing the colors fixes the problem for Android but would appreciate if someone can please explain why this would happen. Thanks Bill Zwirs Share this post Link to post
bzwirs 4 Posted December 13, 2022 For adding text with color (aDocketNum being a string variable): FPdf1.AddText(aDocketNum, 'Arial', 14, 500, 755,TAlphaColorRec.Red); For drawing a filled rectangle: FPdf1.CreatePath(15, 550, fmAlternate,TAlphaColorRec.Blue, True, TAlphaColorRec.Black, 1.0); FPdf1.LineTo(15, 576); FPdf1.LineTo(577, 576); FPdf1.LineTo(577, 550); FPdf1.ClosePath; FPdf1.AddPath; FPdf1 is component supplied with Winsoft PDFium. Bill Share this post Link to post
masood 0 Posted April 17 On 12/13/2022 at 2:15 PM, bzwirs said: FPdf1.AddText(aDocketNum, 'Arial', 14, 500, 755,TAlphaColorRec.Red); This command only works with Arial font! I need it to work with non-English fonts like Arabic and Farsi Share this post Link to post