Print Page | Close Window

AddTrueTypeSubsettedFont Issue

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3122
Printed Date: 15 Oct 25 at 10:41PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: AddTrueTypeSubsettedFont Issue
Posted By: DJen
Subject: AddTrueTypeSubsettedFont Issue
Date Posted: 01 Jun 15 at 11:04PM

 

 

Having some difficulties using AddTrueTypeSubsettedFont and drawtext to write Unicode characters. From my understanding the following code, much of which came from the demo app should work but doesn’t. Nothing is rendered. Right now I'm just running this in the demo app included with the library. Anyone have any ideas? I've also tried:

fontID1 = QP.AddTrueTypeSubsettedFont("Arial", "", 4);

 

 

 

 

 

/* Embed and subset a TrueType font within a PDF */

 

// Use the AddTrueTypeFont function to add a font to

// the default blank document and get the return

// value which is the font ID.

 

fontID1 = QP.AddTrueTypeSubsettedFont("Arial", "你好", 0);

 

// Select the font using its font ID

 

QP.SelectFont(fontID1);

 

// Draw some text onto the document to see if

// everything is working OK.

 

QP.DrawText(100, 700, "你好");

 

// Save the new document to the output folder.

 

QP.SaveToFile(GetOutputFolder() + "embedded_subsetted_font.pdf");

 

// This line will automatically display the PDF in the PDF Preview tab.

 

Preview.OpenFromFile(GetOutputFolder() + "embedded_subsetted_font.pdf");




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk