HTML2FO always uses Arial font in BI Publisher - bi-publisher

I'm trying to do a HTML conversion in my report(RTF) and it works but expected output change my font 'Times New Roman' to Arial. I believe, I changed my default font to Times New Roman even in xdo.config but still HTML2FO makes it Arial.
Other sections of the document has Times New Roman.
XML:
<TEST><p><b><i>This is a test paragraph</b></i>. This is without bold
and italic</p><p><b><i>This is another test paragraph</b></i>. This is
without bold and italic</p><TEST>
BIP Code:
<?HTML2FO:TEST?>
Could anyone please help me in getting this right?
Thanks!

I am having the same problem too. The way I got around this is to change the XML output:
<TEST><div style="font-family:Calibri;font-size:10px;"><p><b><i>This is a test paragraph</b></i>. This is without bold
and italic</p><p><b><i>This is another test paragraph</b></i>. This is
without bold and italic</p></div><TEST>

Related

How to set font in Texinfo

I'm using the GNU texinfo package to generate both PDF and .info files from a .texi file.
I'm trying to update an old .texi file (not changed since 2001) and generate the same PDF output. I've resolved a number of issues, but there are a couple outstanding. In the old PDF, the title was in Helvetica and body text is Liberation Serif. In the new PDF, both are Computer Modern.
I've read everything that I can find about fonts, but I'm not able to change the fonts. Nothing that I do seems to work. Everything I have tried generates errors.
In my .texi file, before any \setfont directives, I have \def\fontprefix{uh} which, if I read the pdftex.map file correctly, should select the NimbusSanL font set (e.g. uhvr8a.pfb). I get the following errors:
mktexnam: Could not map source abbreviation for uhss10.
kpathsea: Running mktexmf uhss10
! I can't find file uhss10'.
<*> ...ljfour; mag:=1; ; nonstopmode; input uhss10`
Does anyone have a example .texi file which sets the font family to use? Or an explanation of what I'm doing wrong?

How to find the typeface of a TrueType font for PCL5 file generation?

I am trying to embed truetype font Treubuchet MS in a PCL5 generating program.
But I've stumbled on a problem. To embed and use the the font I should know its typeface, when selecting it for use in the *.pcl file. But I can't find a reference, where fonts and their typefaces(numbers) are described.
To be more precise, I am using the below sequence for selecting Treubuchet MS regular:
esc(s0S esc(s0B esc(s25513T esc(6982X
Explanation:
not italic, not bold, typeface of font, id of font to be loaded to printer.
But my currently selected typeface (25513) is wrong and the font is not sent and loaded to the printer (soft font added in the file).
Could you help me with this?
As far as I can see, the font ID you need is the one supplied when you created, and downloaded, the soft font.
Note that on page 189 of the PCL 5 reference (section 11-5 Soft Font Creation, in case you have a different version of the spec) it says:
Use the Font ID command to designate a unique ID number prior to the
download of a font header. If an existing font is already associated
with this ID, the existing font is deleted upon the download of the
font header.
The Font ID command can be found on p156 of my copy of the spec:
The Font ID command is used to specify an ID number for use in
subsequent font management commands. The ID number of a font can be
used to select the font for printing (refer to “Font Selection by ID”
in Chapter 8). E C *c#D
# = ID number Default = 0 Range = 0 - 32767 The font ID number is used during subsequent soft font downloads, selections or deletions. The
factory default font ID is 0 (if no Font ID command is sent, an ID of
0 is assigned).
So before you download the soft font you should specify the font ID of the font, eg:
esc*c1D
Then download the font. When you want to use the font you downloaded then you select it with:
esc(1X
Still not a PostScript question though :-)

Zebra ZQ520 printer, download and use new .CPF font with ZPL language

problems to print with different fonts on my Zebra ZQ520:
as described in documentation, I've downloaded some new font through the official Zebra Font Downloader program, comic and verdana. After this, I found the new fonts in E: storage area. So the script:
^XA^HWE:^XZ
give me:
LIST OF FONT LINKS
- DIR E:.
* E:COMIC_02.CPF 7359
* E:VERDAN02.CPF 163 ....
- 66589184 bytes free E: ONBOARD FLASH
and trying to print example string from font downloader program, it print with the installed font with success.
The problem appens if I try to print a label. The printer seems not consider the .CPF files in ZPL commands.
My tests, without success, are:
1) following the procedure indicated in https://km.zebra.com/kb/index?page=content&id=SO7891 , assigning a designator to new font, with the script:
^XA^CWQ,E:COMIC_02.CPF^XZ
and trying to print something as:
^XA^FO50,50^AQN,50,50^FDSAMPLE CoMiC^FS ^XZ
seems not working (is it not possible to assign a designator on .CPF files??)
2) (not working too) test, I tryed to print something with the ^A# command, also without success. Example:
^XA^FO50,50^A#N,50,50,E:COMIC_02.CPF^FDSAMPLE CoMiC^FS ^XZ
Where is the problem? with printer (updated with the last firmware, V76.19.15Z)?
or ZPL can't print font stored in .CPF files?
or ..??
thanks!
The ZQ500 supports multiple printing languages. It ships with the PnP string stating that it is a CPCL printer. This tells the Zebra Setup Utility to generate a CPCL compatible font (.CPF). Since you are looking to print using ZPL you need to generate a font compatible with ZPL.
https://km.zebra.com/resources/sites/ZEBRA/content/live/SOLUTIONS/8000/SO8535/en_US/ZebraNet_Bridge_Font_Converting.pdf
This will use a different program to package a .ttf font for the printer. ZPL has support for truetype fonts so you will have better scaling of the font.
The ^CW and ^A# commands will both work with the ttf font.

How to change the font of the page numbers in word using delphi xe5

I am automating word documents. Generating them solely from code.
Currently i am adding a page number in the header of each page, But i would like to know how to change the font name of the page number along with the font size.
Any help would be appreciated.
Please note, wrddoc is the active document variable.
here is the code i create the page number with:
wrdDoc.Sections[1].Headers[1].PageNumbers.Add(wdAlignPageNumberRight);
And i tried the following code to change the font but i get an error, "method font is not a supported automation object":
wrdDoc.Sections[1].Headers[1].PageNumbers.Font.name:='Times New Roman';
wrdDoc.Sections[1].Headers[1].PageNumbers.Font.Size:=12;
Any help would be appreciated thank you.
It works for me:
wrdDoc.Sections.First.Headers.Item(1).Range.Font.Name := 'Times New Roman';
wrdDoc.Sections.First.Headers.Item(1).Range.Font.Size:= 12;
Delphi XE, Office 2010.

html2pdf and local (latvian) language characters

I am using Html2PDf to convert html to pdf.
But I am not able to achieve that it shows local (latvian) language letters. It shows ? instead.
I do understand that I should somehow add appropriate fonts, but I do not know where to get those fonts (which one support latvinan language) and how to add them into html2pdf.
Html2Pdf is based on tcpdf and currently there is font folder.
I think that is seems trivial question, but I was searching via google, but have not found answer that works for me.
require_once('inc/html2pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P','A4','en');
//$html2pdf->pdf->setDefaultFont('times');
// HEADER
$pdf_output .='<page style="font-size: 11px; >';
$pdf_output .= '<img src="images/raka_pdf_logo.png" alt="logo"/><br><br><br><br>';
...
You may find the right font-family in html2pdf>tcpdf>fonts

Resources