Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Arial Unicode MS not embedding
  FAQ FAQ  Forum Search   Register Register  Login Login

Arial Unicode MS not embedding

 Post Reply Post Reply
Author
Message
Paulidis View Drop Down
Beginner
Beginner


Joined: 28 Jun 13
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Paulidis Quote  Post ReplyReply Direct Link To This Post Topic: Arial Unicode MS not embedding
    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
Back to Top
Wheeley View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Oct 05
Location: United States
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wheeley Quote  Post ReplyReply Direct Link To This Post 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

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

Hope this helps
Wheeley

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store