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!
![]() |
Android : Writing Special Characters To Form Field |
Post Reply ![]() |
Author | |
Ludwig ![]() Team Player ![]() Joined: 07 May 15 Location: India Status: Offline Points: 33 |
![]() ![]() ![]() ![]() ![]() Posted: 15 Mar 16 at 1:02PM |
I am attempting to write special Characters to a PDF acro text field using the Android library of QuickPdf v12.12.
I use the following code: /*I use 18 as it corresponds to Mac CharacterSet which contains the character I wish to write*/ String value = mDQPL.GetInstalledFontsByCharset(18, 0); /*I chose a font from the list returned above*/ String[] fonts = value.split(","); String fontToEmbed = fonts[0].replace("\"", ""); /*I embed the font*/ int embedded = mDQPL.AddTrueTypeFont(fontToEmbed, 1); int fontCount = mDQPL.AddFormFont(embedded); int formFieldCount = mDQPL.DAGetFormFieldCount(fileHandle); /*I set the embedded font as a Form Field Font*/ for (int i = 1; i <= formFieldCount; i++) { if (mDQPL.GetFormFieldType(i) == 1) { String name = mDQPL.GetFormFieldFontName(i); int set = mDQPL.SetFormFieldFont(i,fontCount); String v = "\u00C2"; mDQPL.SetFormFieldValue(i, v); } } mDQPL.SaveToFile(FileOpHelper.returnRootDirectory(context)+"/temmm1.pdf"); mDQPL.DACloseFile(fileHandle); But I do not get any output the PDF remains blank. This happens with every pdf. Please Note: The list of Fonts Installed, filtered by Charset, returned is as follows: "AndroidClock Regular","AndroidClock-Large Regular","AndroidClock-Large Regular","Android Emoji Regular","AnjaliNewLipi Regular","Clockopia Regular","Roboto Bold","Roboto Regular","Droid Sans Armenian Regular","Droid Sans Ethiopic Regular","Droid Sans Fallback Regular","Droid Sans Georgian Regular","Droid Sans Hebrew Bold","Droid Sans Hebrew Regular","Droid Sans Mono Regular","Roboto Regular","Droid Serif Bold","Droid Serif Bold Italic","Droid Serif Italic","Droid Serif Regular", "GS45_Arab(AndroidOS) Regular","GS_Thai Regular","Lohit Bengali Regular","Lohit Kannada Regular","Lohit Telugu Regular","MotoyaLMaru W3 mono","Roboto Bold","Roboto Bold Italic","Roboto Italic","Roboto Light","Roboto Light Italic","Roboto Regular","Roboto Condensed Bold","Roboto Condensed Bold Italic","Roboto Condensed Italic","Roboto Condensed Regular","SamsungBengali Regular","SamsungDevanagari Regular","SamsungGujarathi Regular","SamsungKannada Regular","SamsungMalayalam Regular","SamsungOriya Regular","SamsungPunjabi Regular","SamsungSinhala Regular","SamsungTamil Regular","SamsungTelugu Regular","Droid Naskh Shift Alt Regular","Droid Arabic Naskh Regular","Georgia Bold","Georgia Bold Italic","Georgia Italic","Georgia Regular","HelveticaNeue Thin","NanumGothic Regular","Roboto Thin","Roboto Thin Italic","SamsungKorean Bold","SamsungKorean Regular","SamsungThai(test) Regular
Edited by Ludwig - 15 Mar 16 at 1:06PM |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store