Aspose.Cells による出力 PDF の Unicode 補助文字のレンダリング
Contents
[
Hide
]
通常の Unicode 文字の長さは 2 バイトですが、Unicode 補助文字の長さは 4 バイトです。 Aspose.Cells は、これらの 4 バイト Unicode 文字のレンダリングをサポートするようになりました。
Unicode Character Standard では、補助文字は、U+10000 から U+10FFFF までのコード ポイントが割り当てられた文字です。つまり、これらは U+FFFF より大きい Unicode 文字です。
- UTF-8 では、これらの文字の長さはそれぞれ 4 バイトです。
- UTF-16 では、これらの文字には 2 つのサロゲート (16 ビット単位) が必要です。
Aspose.Cells による出力 PDF の Unicode 補助文字のレンダリング
次のスクリーンショットは、Aspose.Cells がどのようにレンダリングされたかを示しています。ソースエクセルファイルに出力 PDF.ご覧のとおり、3 つの Unicode Supplementary 文字はすべて、Microsoft Excel とまったく同じようにレンダリングされています。
このサンプル コードを使用して、ソースエクセルファイルの中へ出力 PDF.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(RenderUnicodeSupplimentaryCharacterToPDF.class); | |
// Load your source excel file containing Unicode Supplementary | |
// characters | |
Workbook wb = new Workbook(dataDir + "unicode-supplementary-characters.xlsx"); | |
// Save the workbook | |
wb.save(dataDir + "output.pdf"); |