I need to make the
string dataDir = “C:/”;
// Create new document instance
Document pdfDocument = new Document();
// Add page to pages collection of PDF file
Aspose.Pdf.Page page = pdfDocument.Pages.Add();
// Create TextFragment instance with sample text
TextFragment fragment = new TextFragment(“Sample Text in OTF font”);
// Find font inside system font directory
// Fragment.TextState.Font = FontRepository.FindFont(“HelveticaNeueLT Pro 45 Lt”);
// Or you can even specify the path of OTF font in system directory
fragment.TextState.Font = FontRepository.OpenFont(dataDir + “space age.otf”);
// Specify to emend font inside PDF file, so that its displayed properly,
// Even if specific font is not installed/present over target machine
fragment.TextState.Font.IsEmbedded = true;
// Add TextFragment to paragraphs collection of Page instance
dataDir = dataDir + “OTFFont_out.pdf”;
// Save resulting PDF document.
I tried it and it gives the same error, here is the code
I have tested the scenario and have managed to reproduce the problem that "Embedded Subset" font is not showing in Adobe DC. For the sake of correction, I have logged it as PDFNET-42243 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction.
Please be patient and spare us little time. We are sorry for this inconvenience.