Using Js PDF Not able to print the symbol ≥ , ≤ in the output we get "e" d .we try differnt Font like noto sans but did not work
just import a font that contain the symbol.
Link: https://github.com/MrRio/jsPDF
inside the folder examples/js/basic.js you can see how to import a font.
remember that you have to pass a base64 code to make it works.
Related
I am trying to create a PDF File to export using jsPDF library. In one of the lines I am trying to write a word that contains this 'ū' letter,
doc.text('Hūla', 20, 30);
However, when doing so the exported file doesn't contain this letter but instead it becomes
'H k l a' with spaces in between and a k instead of the ū.
What can I do in order to have this printed properly?
The solution was to use a font that supports this. I had to try multiple ones in order to get it working with this letter ū (it is not a specific language)
The font was Amiri. It also supported the Arabic font.
I'm trying to define custom characters on thermal printer NCR 7199.
I used ESC/POS command
ESC & y c1 c2 x d1...dn
and it works fine. But this command can change only characters in range 32-126, and those characters are latin letters and common symbols.
I'd prefer to replace characters with codes 8E-8F, for example, but cannot do it using this command.
Is it possible? Or is there any other ESC/POS command for user-defined characters?
UPD.
It seems like a firmware update can fix this problem. Firmware version on our printer is v99.21, and I saw this in release notes:
v99.25 "based on v99.24"
1. Allowed User-defined characters defined range from 20H to FFH in 7199 Emulation mode
Another user-defined character setting command for Kanji is for printers that support the MBCS character set, which is not what you want.
FS 2
Define user-defined Kanji characters
However, although it is unclear whether NCR 7199 supports it, ESC/POS has the ability to customize the font of the user-defined code page rather than the individual characters.
Please refer to the contents of the following pages.
GS ( E <Function 7>
Copy the user-defined page
GS ( E <Function 8>
Define the data (column format) for the character code page
GS ( E <Function 9>
Define the data (raster format) for the character code page
GS ( E <Function 10>
Delete the data for the character code page
Problem solved by updating firmware.
After updating "Main Firmware" to v99.27 (it seems that version must be greater or equal v99.25) and changing Emulation mode to "NCR 7199" I was finally able to define characters in all range 20-FF.
I am trying to create a plot in gnuplot with dots over the symbol theta in legend.
I am looking to do something similar to, \dot{\theta} and \ddot{\theta} from latex. However, most posts ask to use 'set term latex' or 'set term epslatex' which outputs a .tex file. I need to keep the output as a pdf with the dot and double dot over the theta in the legend. Is this possible? Appreciate any help. Thanks!
In place of 'Pitch rate', I need the symbol theta with a dot above it.
In place of 'Pitch acceleration', I need the symbol theta with two dots above it.
set term pdf
set termopt enhanced
set encoding utf8
set output "rampfuncs.pdf"
set style func linespoints
set xlabel 'time'
set format y "%.2f"
plot "output.dat" using 1:2 title '{/Symbol q} - Pitch angle', \
"output.dat" using 1:3 title 'Pitch rate', \
"output.dat" using 1:4 title 'Pitch acceleration'
set term x11
Update after answer from meuh: Image for reference
Second update after comments from meuh: Image 2
This is described in the section Enhanced text mode of the gnuplot guide. You can use the ~ tilde character to overprint two items, for example ~a/ will overprint a and /. In your case you need to raise the dot character by 1.1 times the font size (found empirically) in order for it to appear above the a so you prefix the character with this number, and enclose it in braces to make it one item: ~a{1.1.}
plot "data" using 1:2 title '{/Symbol q} angle', \
"data" using 1:3 title '~{/Symbol q}{1.1.} rate', \
"data" using 1:4 title '~{/Symbol q}{1.1..} accel'
which gives this result:
There seems to be a bug where the title will not be shown correctly if the ~{}{} construct is at the end of the title. The simple workaround is to add an extra space at the end of the title ~{}{} .
As the title says Is there any option to print the arabic content ZPL Printer.
Thing tried is adding the font and initiate the print
^XA ^FX ^FR ^CF0,40^CI28^FO130,45^FH^FD محاكمة Font file^FS ^XZ
My printer has TT0003M_.TTF font installed but it shows "????" when i tried to print arabic using
^XA^FO50,50^AE:TT0003M_.TTFN,50,50^FDمحاكمة^FS ^XZ
Any idea how to install a font and print the arabic text using ZPL language?
^XA^CI28^CW1,E:TT0003M_.TTF^LL130^FS
^PA0,1,1,1
^FO50,50^A1N30,30^FDمحاكمة
^FS
^XZ
Updated this answer to match the other question
Also found this on the Zebra KB - https://km.zebra.com/kb/index?page=content&id=SO6820&actp=RSS
Maybe it is too late to answer your question :) but I have the same issue and I solve it so I want to share my answer.
1- You can use ZebraDesigner 3 or "BarTender Designer" to design your ZPL code.
2- Use this font ZEBRA Swiss Unicode, it support Arabic characters.
3- After finish your design click Print and check the box "Print to file" then click Print and save the file with extension ".prn".image
4- Open the file using notepad and you will see the ZPL code.
5- Here is the result
^FPH,3^FT225,224^A#N,141,141,TT0003M_^FH\^CI28^FDمحاكمة^FS^CI27
Or the full result in this image.
6- If you are using online zpl viewer like this don't worry if you can't see the Arabic characters, but if you want to print you will not see any problems
7- Don't try to make your text in the center ,usin this will cut and reverse the Arabic text
The default is Field Text > "^FT"or with x,x"^FTx,y" "^FT225,224" like in this code:
^FPH,3^FT225,224^A#N,141,141,TT0003M_^FH\^CI28^FDمحاكمة^FS^CI27
If you try to center,right or left your Arabic text it will use Field Block "^FB" "^FB383,1,75,C" it is different than "^FT" and it is not supporting Arabic text.
^FPH,3^FT225,224^A#N,141,141,TT0003M_^FB383,1,75,C^FH\^CI28^FDمحاكمة^FS^CI27
you can see Field Block properties in this book at page 169
8- I'm not sure but I tried very hard and there is no way to center the arabic text until now.
But I have a trick using ^FT width to calculate the center
Using this function ,it is c#:
//Define page_width and font_width
int page_width = 600;
int font_width = 18;
call the function it will return X position (center).
string ar = "محاكمة محاكمة محاكمة";
string FT_center = center_line(ar);
here is the function, 315 = middle width or center point
public string center_line(string arabic_text)
{
int text_width = (arabic_text.Length * font_width) / 2;
decimal d = ((page_width - (text_width / 2)));
int x = Convert.ToInt16(Math.Round(d)) ;
x = 315 + (text_width / 2);
return x.ToString();
}
use it like this:
^FPH,3^FT"+FT_center+#",224^A#N,141,141,TT0003M_^FH\^CI28^FDمحاكمة^FS^CI27
I have the following program:
let txt = "إتصالات"
printfn "Text is: %s" txt
0 // return an integer exit code
The value of txt is being set to some Arabic characters. When I run the program what is being displayed on the console is a bunch of question marks rather than the characters. In the Visual Studio 2012 debugger the correct characters are being displayed for the txt variable.
What am I doing wrong and how does one properly display international characters?
According to How to write unicode chars to console? you need to set the OutputEncoding property on the console, like this:
System.Console.OutputEncoding <- System.Text.Encoding.Unicode
let txt = "إتصالات"
printfn "Text is: %s" txt
0 // return an integer exit code
The answer for that question is worth reading though, because it also describes why you need to change your console font to really make this work, and also how to do it.
Here are some additional links with more information:
Necessary criteria for fonts to be available in a command window (this is for Windows 2000 and may not entirely apply to Windows 8, but it should give you a good idea of what to look for in a font).
Windows Console and TrueType Fonts shows how to add new fonts to the console.
Anyone who says the console can't do Unicode isn't as smart as they think they are has some background information about writing Unicode text to the console.
Update: Since the Arabic text in the example renders just fine here on StackOverflow, I peeked at the CSS to see which fonts they're using to render preformatted text. Using that list and the Windows Character Map tool (Start -> All Programs -> Accessories -> System Tools -> Character Map), I've found the Courier New font (which ships with Windows) supports Arabic characters. If you use the registry hack in the "Windows Console and TrueType Fonts" link (above), you should be able to add Courier New as a font you can use in the console.