Set PDF fonts to be embedded.

This commit is contained in:
Rich
2013-10-04 20:30:14 +00:00
parent 4abeb80fb4
commit 48960152ac
6 changed files with 18 additions and 18 deletions

View File

@@ -243,6 +243,7 @@ namespace Volian.Print.Library
try
{
writer = PdfWriter.GetInstance(document, new FileStream(outputFileName, FileMode.Create));
writer.PDFXConformance = PdfWriter.PDFA1B;
}
catch (Exception ex)
{
@@ -790,7 +791,7 @@ namespace Volian.Print.Library
if (textLayer != null) cb.BeginLayer(textLayer);
float fontSize = 30;
ColumnText ct = new ColumnText(cb);
iTextSharp.text.Font font = FontFactory.GetFont("Arial", fontSize, new iTextSharp.text.Color(PrintOverride.TextColor));
iTextSharp.text.Font font = FontFactory.GetFont("Arial", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, fontSize,iTextSharp.text.Font.NORMAL, new iTextSharp.text.Color(PrintOverride.TextColor));
Chunk chk = new Chunk(message, font);
float xCenter = cb.PdfDocument.PageSize.Width / 2;
float yCenter = cb.PdfDocument.PageSize.Height / 2;