Print Page | Close Window

Arial Unicode MS not embedding

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=2685
Printed Date: 19 May 24 at 7:07PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Arial Unicode MS not embedding
Posted By: Paulidis
Subject: Arial Unicode MS not embedding
Date Posted: 09 Jul 13 at 4:44PM
Im having a really hard time making Unicode display properly
 
when I use a 0 instead of a 1 in the AddTrueTypeSubsettedFont function, it displays fine
 
is it a licensing issue when embedding Arial Unicode MS?
 
// Store Num Fields
m_iNumFields = 6;
string_t sText = _T("French : Created 警告。如果你是一个娇气的性格,你可能不希望阅读此页。它包含了明确的说明和外科手术 icode Inscrivez-vous dès maintenant à la dixième Conférence internationale sur Unicode, qui se tiendra du 10 au 12 mars 1997 à Mayence, en Allemagne. Cette conférence rassemblera des experts de tous les horizons industriels sur les sujets suivants : l’Internet mondial et Unicode, l’internationalisation et l’adaptation locale, l’implémentation d’Unicode dans les systèmes d’exploitation et les applications, les polices de caractères, la disposition de texte, l’informatique plurilingue. Quand le monde veut communiquer, il parle en Unicode");
 
m_oPdfLib->SetOrigin(1);
 
int m_iNumFields = 6;
 
// Create Table, specifying num rows and columns. This table will be reused per document
int m_iPdfTableId = m_oPdfLib->CreateTable(m_iNumFields, 2);
 
int fid = m_oPdfLib->AddTrueTypeSubsettedFont(_T("Arial Unicode MS"), sText, 1);
m_oPdfLib->SetHTMLNormalFont(_T("default"), fid);
m_oPdfLib->SetHTMLBoldFont(_T("default"), fid);
 
// Specify Cell Border Style
m_oPdfLib->SetTableCellBorderColor(m_iPdfTableId, 1, 1, m_iNumFields, 2, 0, 1.0, 1.0, 1.0);
m_oPdfLib->SetTableCellBorderWidth(m_iPdfTableId, 1, 1, m_iNumFields, 2, 0, 2.0);
 
// Specify a background color for the column headers
m_oPdfLib->SetTableCellBackgroundColor(m_iPdfTableId, 1, 1, m_iNumFields, 1, 0.8, 0.8, 0.8);
 
// Specify table column width (based on their percentages)
m_oPdfLib->SetTableColumnWidth(m_iPdfTableId, 1, 1, 0.32 * m_oPdfLib->PageWidth());
m_oPdfLib->SetTableColumnWidth(m_iPdfTableId, 2, 2, 0.48 * m_oPdfLib->PageWidth());
 
// Column Label Row Data
forint i = 0; i < m_iNumFields; ++i )
    m_oPdfLib->SetTableCellContent(m_iPdfTableId, i+1, 1, _T("abcdefg"));
 
//QP.SetHTMLNormalFont("default", QP.AddStandardFont(4));
m_oPdfLib->SetTableCellContent(m_iPdfTableId, 2, 2, sText);
 
m_oPdfLib->DrawTableRows(m_iPdfTableId, 20, 20, m_oPdfLib->PageWidth() - 40, 1, m_iNumFields);
 
m_oPdfLib->SaveToFile(_T("out.pdf"));
 
 
 
Im using version 9.3



Replies:
Posted By: Wheeley
Date Posted: 09 Jul 13 at 9:46PM
Your problem is user error. Why are you passing 1 for the Optons parameter when the function reference clearly says to use 0. See here:

http://www.debenu.com/docs/pdf_library_reference/AddTrueTypeSubsettedFont.php" rel="nofollow - http://www.debenu.com/docs/pdf_library_reference/AddTrueTypeSubsettedFont.php

Also your own experience show that 0 is the correct parameter to pass.

Hope this helps
Wheeley




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