Steros Posted June 22, 2020 Share Posted June 22, 2020 I'm using MPDF_UDF to create pdf, but now I need to print special characters like this: ❤ (❤) It's possible ? Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted June 22, 2020 Developers Share Posted June 22, 2020 ...and how exactly is this an AutoIt3 question? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Steros Posted June 23, 2020 Author Share Posted June 23, 2020 19 hours ago, Jos said: ...and how exactly is this an AutoIt3 question? I was hoping someone could help me since MPDF_UDF.au3 I downloaded it from here: Maybe someone had the same need (create a pdf with special characters) Link to comment Share on other sites More sharing options...
Developers Jos Posted June 23, 2020 Developers Share Posted June 23, 2020 Ok... and do you have an example script that will create the PDF with this issue? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Steros Posted June 23, 2020 Author Share Posted June 23, 2020 (edited) 3 hours ago, Jos said: Ok... and do you have an example script that will create the PDF with this issue? Jos I receive text script from a textarea and I should print them as they were written, this is an example (pdf output is "Test: ??" instead of "Test: ♥") #include "MPDF_UDF.au3" PrintPdf() Func PrintPdf() ;set the properties for the pdf _SetUnit($PDF_UNIT_CM) _SetPaperSize("A4") _SetZoomMode($PDF_ZOOM_CUSTOM, 90) _SetOrientation($PDF_ORIENTATION_PORTRAIT) _SetLayoutMode($PDF_LAYOUT_CONTINOUS) _OpenAfter(True) ;open pdf after generation ;initialize the pdf _InitPDF(@ScriptDir & "\TEST.pdf") ;fonts: _LoadFontTT("_Arial", $PDF_FONT_ARIAL) _LoadFontTT("_TimesT", $PDF_FONT_TIMES) _LoadFontTT("_Calibri", $PDF_FONT_CALIBRI) _LoadFontStandard("_Garamond", $PDF_FONT_GARAMOND) _LoadFontStandard("_Courier", $PDF_FONT_COURIER) _BeginPage() Local $rigDes="Test: ♥" ;ALT+3 _DrawText(1, 28, $rigDes, "_Arial", 12, $PDF_ALIGN_LEFT, 0) Local $rigDes="Test: ❤️" _DrawText(1, 27, $rigDes, "_Arial", 12, $PDF_ALIGN_LEFT, 0) _EndPage() _ClosePDFFile() EndFunc Func _Iif($fTest, $vTrueVal, $vFalseVal) If $fTest Then Return $vTrueVal Else Return $vFalseVal EndIf EndFunc ;==>_Iif Edited June 23, 2020 by Steros Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now