From 42236198027a2b8bec885afcc894fdfbe5901090 Mon Sep 17 00:00:00 2001 From: "Valeriano A.R" Date: Sun, 11 Jun 2017 16:05:17 +0200 Subject: [PATCH] Set "Times-Roman" as default basefont. --- VAR.PdfTools/PdfFont.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/VAR.PdfTools/PdfFont.cs b/VAR.PdfTools/PdfFont.cs index 3c2c56b..55d641b 100644 --- a/VAR.PdfTools/PdfFont.cs +++ b/VAR.PdfTools/PdfFont.cs @@ -54,6 +54,10 @@ namespace VAR.PdfTools private void PrepareSizes(PdfDictionary baseData) { + // Set "Times-Roman" as default basefont sizes + _widths = PdfStandar14FontMetrics.Times_Roman.Widths; + _height = PdfStandar14FontMetrics.Times_Roman.ApproxHeight; + if (baseData.Values.ContainsKey("ToUnicode")) { byte[] toUnicodeStream = ((PdfStream)baseData.Values["ToUnicode"]).Data;