Spire.OCR 2.2.12 improves image recognition formatting
We’re pleased to announce the release of Spire.OCR 2.2.12. This version fixes an issue where the OCR engine failed to preserve indentation and line spacing when recognizing images, further improving recognition results and document formatting retention. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREOCR-137 | Fixed an issue where the OCR engine failed to preserve indentation and line spacing when recognizing images. |
Spire.PDF for Java 12.6.1 supports SHA-256/SHA-512 digital signatures
We’re excited to announce the release of Spire.PDF for Java 12.6.1. This update introduces support for digitally signing PDFs with SHA-256/SHA-512 certificates and allows setting a fallback font when converting OFD to PDF. In addition, it resolves several issues related to PDF conversion and text extraction.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREPDF-7829 | Added support for signing with SHA-256/SHA-512 algorithm certificates.
public static void main(String[] args) throws IOException {
// Create pdf document
PdfDocument doc = new PdfDocument();
// Load file from disk
doc.loadFromFile("Sample.docx");
// Load the X509 certificate for signature
PdfPKCS7Formatter formatter = new PdfPKCS7Formatter(new PdfCertificate("gary.pfx", "e-iceblue"), false);
// Create an instance of PdfOrdinarySignatureMaker using the loaded document and certificate
PdfOrdinarySignatureMaker signatureMaker = new PdfOrdinarySignatureMaker(doc, formatter);
// Create an instance of PdfCustomSignatureAppearance as the appearance for the signature
IPdfSignatureAppearance signatureAppearance = new PdfCustomSignatureAppearance();
// Make the signature with a specified name and the custom appearance
signatureMaker.makeSignature("Signature", signatureAppearance);
// Iterate through all hash algorithm types
for (HashAlgorithmType hashAlg : HashAlgorithmType.values()) {
// Skip SM3 (case-insensitive)
if ("SM3".equalsIgnoreCase(hashAlg.name())) {
continue;
}
try {
// Set the current hash algorithm
formatter.getProperties().setHashAlgorithm(hashAlg);
String filePath = "AddImageSignature_" + hashAlg.name() + ".pdf";
doc.saveToFile(filePath, FileFormat.PDF);
System.out.println("Succeed:" + hashAlg.name());
} catch (Exception ex) {
System.out.println("Error HashAlgorithmType:" + hashAlg.name());
System.out.println("Error Info:" + ex.getMessage());
}
}
// Close the document
doc.close();
}
// Custom signature appearance implementation
public static class PdfCustomSignatureAppearance implements IPdfSignatureAppearance {
@Override
public void generate(PdfCanvas pdfCanvas) {
// Set font size
int fontSize = 10;
// Create Arial font
PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Arial", Font.PLAIN, fontSize), true);
// Set line height
float lineHeight = fontSize;
// Draw text string
pdfCanvas.drawString("AAAAAAAAAAA", font, PdfBrushes.getRed(), new Point.Float(0, 0));
// Draw image at specified position
pdfCanvas.drawImage(PdfImage.fromFile("E-iceblue logo.png"), new Point.Float(20, 0));
}
}
|
| New Feature | SPIREPDF-8077 | Added support for setting a fallback font when converting OFD to PDF.
OfdConverter converter = new OfdConverter(ofdFile.getAbsolutePath()); converter.getOptions().setDefaultFontName(fontName); converter.toPdf(PdfPath); |
| New Feature | SPIREPDF-8078 | Added a progress callback for OFD to PDF conversion.
CustomProgressNotifier progressNotifier =new CustomProgressNotifier(output_txt);
ofdConverter ofdconverter=new Ofdconverter(inputPath);
ofdconverter.registerProgressNotifier(progressNotifier);
ofdConverter.toPdf(outputPath);
CustomProgressNotifier progressNotifier2=new CustomProgressNotifier(output_txt2);
PdfToWordConverter converter=new PdfTowordConverter(inputPath2);
converter.registerProgressNotifier(progressNotifier2);
converter.saveToDocx(outputPath2)
|
| Bug Fix | SPIREPDF-8040 | Fixed the issue where loading a PDF without a permission password caused an exception. |
| Bug Fix | SPIREPDF-8060 | Fixed the issue where converting an image to PDF caused an exception. |
| Bug Fix | SPIREPDF-8065 | Fixed the issue where checkmarks were missing when converting PDF to PDFA. |
| Bug Fix | SPIREPDF-8067 | Fixed the issue where extracted PDF text contained garbled characters. |
| Bug Fix | SPIREPDF-8079 | Fixed the issue where PDF-to-SVG conversion displayed incorrect content in browsers. |
Spire.PDF for Python 12.6.0 Adds DataSource Support for PdfTable and PdfGrid
We're pleased to announce the release of Spire.PDF for Python 12.6.0. This version mainly exposes the DataSource property for both PdfTable and PdfGrid, enabling direct binding of structured data. Details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | - | Exposed the DataSource property for both PdfTable and PdfGrid, enabling direct binding of structured data.
# Create a PDF document
doc = PdfDocument()
# Get the first page
page = doc.Pages.Add()
# Set initial Y position
y = 320.0
# Draw title
brush1 = PdfBrushes.get_Black()
font1 = PdfTrueTypeFont("Arial", 16.0, PdfFontStyle.Bold, True)
format1 = PdfStringFormat(PdfTextAlignment.Center)
page.Canvas.DrawString("Country List", font1, brush1, page.Canvas.ClientSize.Width / 2, y, format1)
# Update Y position after title
y = y + font1.MeasureString("Country List", format1).Height
y = y + 5.0
# Prepare raw data
data = [
"Name;Capital;Continent;Area;Population",
"Argentina€;Buenos Aires;South America;2777815;32300003",
"Bolivia;La Paz;South America;1098575;7300000",
"Brazil;Brasilia;South America;8511196;150400000",
"Canada;Ottawa;North America;9976147;26500000",
"Chile;Santiago;South America;756943;13200000"
]
# Convert to 2D array
dataSource = [row.split(";") for row in data]
# Create table
table = PdfTable()
table.Style.CellPadding = 2
# Set alternate row font
font = PdfTrueTypeFont("Arial", 8.0, PdfFontStyle.Regular, True)
table.Style.AlternateStyle.Font = font
# Configure header
table.Style.HeaderSource = PdfHeaderSource.Rows
table.Style.HeaderRowCount = 1
table.Style.ShowHeader = True
# Bind data source
table.DataSource = data
# Draw table (Uncomment to enable)
result = table.Draw(page, PointF(60.0, y))
y = y + result.Bounds.Height + 5
# Draw footer note
brush2 = PdfBrushes.get_Gray()
font2 = PdfTrueTypeFont("Arial", 9.0, PdfFontStyle.Regular, True)
page.Canvas.DrawString(f"* {len(data) - 1} countries in the list.",
font2, brush2, 65.0, y)
# Save and close document
doc.SaveToFile(outputFile)
doc.Close()
# Create a PDF document
doc = PdfDocument()
# Add an A4 page with custom margins
page = doc.Pages.Add(PdfPageSize.A4(), PdfMargins(5.0))
# Initialize the grid and set cell padding
grid = PdfGrid()
grid.Style.CellPadding = PdfPaddings(10.0, 10.0, 10.0, 10.0)
# Prepare raw data
data = ["Name;Capital;Continent;Area;Population",
"Argentina;Buenos Aires;South America;2777815;32300003",
"Bolivia;La Paz;South America;1098575;7300000",
"Brazil;Brasilia;South America;8511196;150400000",
"Canada;Ottawa;North America;9976147;26500000",
"Chile;Santiago;South America;756943;13200000"
]
# Bind data source to the grid
grid.DataSource = data
# Center align text in all cells horizontally and vertically
for j in range(grid.Rows.Count):
cells = grid.Rows.get_Item(j).Cells
for k in range(cells.Count):
cells.get_Item(k).StringFormat = PdfStringFormat(PdfTextAlignment.Center, PdfVerticalAlignment.Middle)
# Draw the grid on the page
grid.Draw(page, PointF(0.0, 0.0));
# Save the document as a PDF
doc.SaveToFile(outputFile)
# Close the document
doc.Close()
|
Spire.Doc for Java 14.6.0 enhances the conversion from Word to PDF
We're pleased to announce the release of Spire.Doc for Java 14.6.0. This version enhances the conversion from Word to PDF and also fixes an issue where cross-reference fields were updated incorrectly. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREDOC-11785 | Fixed an issue where symbols wrapped incorrectly when converting Word to PDF. |
| Bug Fix | SPIREDOC-11908 | Fixed an issue where cross-reference fields were updated incorrectly. |
| Bug Fix | SPIREDOC-11920 | Fixed an issue where text positions were incorrect when converting Word to PDF. |
| Bug Fix | SPIREDOC-11947 | Fixed an issue where bullet styles were incorrect when converting Word to PDF. |
Spire.Office 11.5.0 is released
We’re pleased to announce the release of Spire.Office 11.5.0. In this version, Spire.Doc enhances Word to PDF conversion. Spire.XLS enhances the conversion from Excel to EMF. Spire.Presentation adds support for saving PPTX to video. Spire.PDF adds support for SHA-2 and SHA-256 digital signature algorithms. Moreover, a large number of known bugs has been fixed successfully in this version.
In this version, the most recent versions of Spire.Doc, Spire.PDF, Spire.XLS, Spire.Presentation, Spire.Barcode, Spire.DocViewer, Spire.PDFViewer, Spire.Email, Spire.Spreadsheet, and Spire.OfficeViewer are included.
DLL Versions:
- Spire.Doc.dll v14.5.14
- Spire.Pdf.dll v12.5.8
- Spire.XLS.dll v16.5.6
- Spire.Presentation.dll v11.5.1
- Spire.Barcode.dll v7.5.0
- Spire.Email.dll v6.8.0
- Spire.DocViewer.Forms.dll v8.9.5
- Spire.PdfViewer.Asp.dll v8.2.13
- Spire.PdfViewer.Forms.dll v8.2.13
- Spire.Spreadsheet.dll v7.5.3
- Spire.OfficeViewer.Forms.dll v8.8.1
Here is a list of changes made in this release
Spre.doc
| Category | ID | Description |
| Bug Fix | SPIREDOC-10767 | Fixed an issue where a “NullReferenceException” was thrown when using FixedLayoutPage.Section. |
| Bug Fix | SPIREDOC-10826 | Fixed an issue where a “NullReferenceException” was thrown when using FixedLayoutDocument.GetLayoutEntitiesOfNode(). |
| Bug Fix | SPIREDOC-11425 | Fixed an issue with incorrect font effects when converting Word to PDF. |
| Bug Fix | SPIREDOC-11845 | Fixed an issue with incorrect value retrieval for IF fields. |
| Bug Fix | SPIREDOC-11855 | Fixed an issue with inconsistent table layout when converting Word to PDF. |
| Bug Fix | SPIREDOC-11858 | Fixed an issue where an “Arg_NullReferenceException” was thrown when converting Word to PDF. |
| Bug Fix | SPIREDOC-11859 | Fixed an issue where a “System.InvalidOperationException” was thrown when removing fields and saving Word to PDF. |
| Bug Fix | SPIREDOC-11897 | Fixed an issue where loading Word documents failed with “Value cannot be null. Arg_ParamName_Name”. |
| Bug Fix | SPIREDOC-11898 | Fixed an issue with inconsistent pagination when converting Word to PDF. |
| Bug Fix | SPIREDOC-11902 | Fixed an issue where a “NullReferenceException” was thrown when replacing bookmarks. |
| Bug Fix | SPIREDOC-11942 | Fixed an issue where incorrect pages were extracted using ExtractPages(0,1). |
Spre.XLS
| Category | ID | Description |
| Bug Fix | SPIREXLS-6129 | Fixed the issue where a "GDI+" exception was thrown when converting Excel files to EMF format. |
| Bug Fix | SPIREXLS-6130 | Fixed the issue where read formula values returned incorrect results. |
| Bug Fix | SPIREXLS-6136 | Fixed the issue where formula values were calculated incorrectly. |
Spire.Presentation
| Category | ID | Description |
| Bug Fix | SPIREPPT-3105 | Fixes the issue where loading PPT format documents threw an exception. |
| Bug Fix | SPIREPPT-3106, SPIREPPT-3119, SPIREPPT-3121, SPIREPPT-3123 | Fixes the issue where converting PowerPoint to PDF resulted in incorrect rendering. |
| Bug Fix | SPIREPPT-3114 | Fixes the issue where shapes became blank when converted to SVG. |
| Bug Fix | SPIREPPT-3116 | Fixes the issue where retrieving images from PowerPoint documents threw a "Parameter is not valid" exception. |
| Bug Fix | SPIREPPT-3122 | Fixes the issue where images were missing after converting PowerPoint to PDF. |
Spire.PDF
| Category | ID | Description |
| New Feature | SPIREPDF-4878 | Added support for SHA-2 and SHA-256 hash algorithms in digital signatures.
PdfDocument pdf = new PdfDocument();
pdf.LoadFromFile(inputFile);
X509Certificate2 cert = new X509Certificate2(inputFile_pfx, "e-iceblue");
IPdfSignatureFormatter formatter = new PdfPKCS7Formatter(cert, false);
PdfMDPSignatureMaker pdfMDPSignatureMaker = new PdfMDPSignatureMaker(pdf, formatter);
PdfSignature signature = pdfMDPSignatureMaker.Signature;
signature.Name = "e-iceblue";
signature.ContactInfo = "028-81705109";
signature.Location = "chengdu";
signature.Reason = " this document";
PdfSignatureAppearance appearance = new PdfSignatureAppearance(signature);
appearance.NameLabel = "Signer: ";
appearance.ContactInfoLabel = "ContactInfo: ";
appearance.LocationLabel = "Loaction: ";
appearance.ReasonLabel = "Reason: ";
pdfMDPSignatureMaker.MakeSignature("signName", pdf.Pages[0], 100, 100, 250, 200, appearance);
foreach (HashAlgorithmType hashAlgorithmType in Enum.GetValues(typeof(HashAlgorithmType)))
{
if (string.Equals(hashAlgorithmType.ToString(), "SM3", StringComparison.OrdinalIgnoreCase))
{
continue;
}
//default value of HashAlgorithm is SHA256
formatter.Properties.HashAlgorithm = hashAlgorithmType;
try
{
pdf.SaveToFile( "out.pdf", FileFormat.PDF);
}
catch (Exception ex)
{
Console.WriteLine($"error:{ex.Message}");
}
}
pdf.Dispose();
|
| Bug Fix | SPIREPDF-8016 | Fixed an issue with content loss when printing PDF documents. |
| Bug Fix | SPIREPDF-8017 | Fixed an issue where an "ArgumentException" was thrown when converting PDF to images. |
| Bug Fix | SPIREPDF-8026 | Fixed an issue where "Object reference not set to an instance of an object" was thrown when merging PDF documents. |
| Bug Fix | SPIREPDF-8031 | Fixed an issue where the retrieved font was incorrect after filling PdfTextBoxField content with a specified font. |
| Bug Fix | SPIREPDF-8042 | Fixed an issue where an "IndexOutOfRangeException" was thrown when saving the result document while overwriting the source file. |
| Bug Fix | SPIREPDF-8027 | Fixes the issue where the program threw an "Index was outside the bounds of the array" exception during PDF to image conversion. |
| Bug Fix | SPIREPDF-8032 | Fixes the issue where characters were duplicated when extracting text from PDF pages. |
Spire.OfficeJS 11.5.7 starts to support Linux Arm64 environment
We’re pleased to announce the release of Spire.OfficeJS 11.5.7. This update adds a new Linux (Arm64) deployment package, providing broader platform compatibility for modern server environments. In addition, Spire.OfficeJS now supports mobile document opening and collaborative editing through the "coAuthorUrl" configuration. These enhancements further improve the flexibility and usability of Spire.OfficeJS for online office applications. More details are as follows.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | - | Added "Spire.OfficeJS for Linux (Arm64)" package to support Linux Arm64 environment. |
| New Feature | - | Added "Open Document" functionality under the "File" menu in the editor. |
| New Feature | - | Added support for Japanese displaying language, which can be enabled by setting "viewLanguage": "ja". |
| New Feature | - | Added support for opening documents on mobile devices. |
| New Feature | - | Added support for collaboration features by configuring "coAuthorUrl".
"serverless":
{ "useServerless": true, "baseUrl": "http://127.0.0.1:3000", "coAuthorUrl": "http://127.0.0.1:8000" }
|
Spire.Office for Java 11.5.0 is released
We are excited to announce the release of Spire.Office for Java 11.5.0. In this version, Spire.PDF for Java adds support for PDF conversion progress callback; Spire.Doc for Java adds support for footnote/endnote counting and font embedding option; Spire. Presentation for Java adds support for compressing images. Besides, many issues have been successfully fixed in this version. More details are listed below.
Here is a list of changes made in this release
Spire.Doc for Java
| Category | ID | Description |
| New Feature | SPIREDOC-11693 | Added support for retrieving the number of footnotes or endnotes.
Document doc = new Document();
doc.loadFromFile(inputFile);
StringBuilder sb = new StringBuilder();
for (int n = 0; n < doc.getSections().getCount(); n++) {
Section s = doc.getSections().get(n);
for (int i = 0; i < s.getParagraphs().getCount(); i++) {
Paragraph para = s.getParagraphs().get(i);
for (int j = 0, cnt = para.getChildObjects().getCount(); j < cnt; j++) {
ParagraphBase pBase = (ParagraphBase) para.getChildObjects().get(j);
if (pBase instanceof Footnote) {
Footnote fn = (Footnote) pBase;
if (fn.getFootnoteType() == FootnoteType.Footnote) {
StringBuilder fnText = new StringBuilder();
for (int k = 0; k < fn.getTextBody().getParagraphs().getCount(); k++) {
fnText.append(fn.getTextBody().getParagraphs().get(k).getText());
}
sb.append("Footnote:"+ fnText.toString() + "\nFootnoteID:" + fn.getId() + "\n");
}
if (fn.getFootnoteType() == FootnoteType.Endnote) {
StringBuilder enText = new StringBuilder();
for (int k = 0; k < fn.getTextBody().getParagraphs().getCount(); k++) {
enText.append(fn.getTextBody().getParagraphs().get(k).getText());
}
sb.append("Endnote:"+ enText.toString() + "\nEndnoteID:" + fn.getId() + "\n");
}
}
}
}
}
|
| New Feature | SPIREDOC-11878 | Added support for the “Embed only characters used in the document” setting.
doc.setEmbedFontsInFile(true); doc.setSaveSubsetFonts(true); |
| Bug Fix | SPIREDOC-11829 | Fixed an issue with inconsistent formatting when converting Word to PDF. |
| Bug Fix | SPIREDOC-11899 | Fixed an issue with blurry images when converting Word to PDF. |
Spire.PDF for Java
| Category | ID | Description |
| New Feature | SPIREPDF-8044 | Added support for progress callback when converting PDF documents.
class CustomProgressNotifier implements IProgressNotifier {
StringBuilder str = new StringBuilder();
private String outputFile;
public CustomProgressNotifier(String outputFile) {
this.outputFile = outputFile;
}
@Override
public void notify(float progress) {
str.append("==============Progress: ").append(progress).append("%==============\n");
try {
Files.writeString(Paths.get(outputFile), str.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
//using
PdfDocument pdf=new PdfDocument();
pdf.loadFromFile("test.pdf");
pdf.registerProgressNotifier(new CustomProgressNotifier("Progress.txt"));
pdf.saveToFile("out.docx", FileFormat.DOCX);
pdf.dispose();
|
| Bug Fix | SPIREPDF-7642 | Fixed issue with content inconsistency when converting SVG to PDF. |
| Bug Fix | SPIREPDF-7683 | Fixed issue with incorrect validation results of digital signatures. |
Spire.Presentation for Java
| Category | ID | Description |
| New Feature | SPIREPPT-3082 | Added support for compressing images.
Presentation presentation = new Presentation();
presentation.loadFromFile(inputFile);
SlideCollection slides = presentation.getSlides();
for (int i = 0; i < slides.getCount(); i++) {
ISlide slide = slides.get(i);
ShapeCollection shapes = slide.getShapes();
for (int j = 0; j < shapes.getCount(); j++) {
IShape shape = shapes.get(j);
if (shape instanceof SlidePicture) {
SlidePicture slidepicture = (SlidePicture) shape;
// The smaller the value, the greater the compression
boolean result = slidepicture.getPictureFill().getCompressImage( true, 50f);
}
}
}
|
| Bug Fix | SPIREPPT-3093 | Fixed the issue where the background color was incorrect when converting PowerPoint to PDF. |
Spire.Doc 14.5.14 enhances Word to PDF conversion
We’re pleased to announce the release of Spire.Doc 14.5.14. This version enhances Word to PDF conversion and fixes several issues, including layout inconsistencies, font rendering problems, and multiple exceptions occurring during document processing. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREDOC-10767 | Fixed an issue where a “NullReferenceException” was thrown when using FixedLayoutPage.Section. |
| Bug Fix | SPIREDOC-10826 | Fixed an issue where a “NullReferenceException” was thrown when using FixedLayoutDocument.GetLayoutEntitiesOfNode(). |
| Bug Fix | SPIREDOC-11425 | Fixed an issue with incorrect font effects when converting Word to PDF. |
| Bug Fix | SPIREDOC-11845 | Fixed an issue with incorrect value retrieval for IF fields. |
| Bug Fix | SPIREDOC-11855 | Fixed an issue with inconsistent table layout when converting Word to PDF. |
| Bug Fix | SPIREDOC-11858 | Fixed an issue where an “Arg_NullReferenceException” was thrown when converting Word to PDF. |
| Bug Fix | SPIREDOC-11859 | Fixed an issue where a “System.InvalidOperationException” was thrown when removing fields and saving Word to PDF. |
| Bug Fix | SPIREDOC-11897 | Fixed an issue where loading Word documents failed with “Value cannot be null. Arg_ParamName_Name”. |
| Bug Fix | SPIREDOC-11898 | Fixed an issue with inconsistent pagination when converting Word to PDF. |
| Bug Fix | SPIREDOC-11902 | Fixed an issue where a “NullReferenceException” was thrown when replacing bookmarks. |
| Bug Fix | SPIREDOC-11942 | Fixed an issue where incorrect pages were extracted using ExtractPages(0,1). |
Spire. Presentation for Java 11.5.1 supports compressing images
We are pleased to announce the release of Spire.Presentation for Java 11.5.1. This version adds a new feature to compress images and also fixes an issue while converting PowerPoint to PDF. Details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREPPT-3082 | Added support for compressing images.
Presentation presentation = new Presentation();
presentation.loadFromFile(inputFile);
SlideCollection slides = presentation.getSlides();
for (int i = 0; i < slides.getCount(); i++) {
ISlide slide = slides.get(i);
ShapeCollection shapes = slide.getShapes();
for (int j = 0; j < shapes.getCount(); j++) {
IShape shape = shapes.get(j);
if (shape instanceof SlidePicture) {
SlidePicture slidepicture = (SlidePicture) shape;
// The smaller the value, the greater the compression
boolean result = slidepicture.getPictureFill().getCompressImage( true, 50f);
}
}
}
|
| Bug Fix | SPIREPPT-3093 | Fixed the issue where the background color was incorrect when converting PowerPoint to PDF. |
Spire.Doc for Java 14.5.3 supports footnote/endnote counting and font embedding option
We’re pleased to announce the release of Spire.Doc for Java 14.5.3. This version adds support for retrieving the number of footnotes or endnotes, as well as the “Embed only characters used in the document” setting. It also fixes several issues related to Word-to-PDF conversion, including inconsistent formatting and blurry images. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREDOC-11693 | Added support for retrieving the number of footnotes or endnotes.
Document doc = new Document();
doc.loadFromFile(inputFile);
StringBuilder sb = new StringBuilder();
for (int n = 0; n < doc.getSections().getCount(); n++) {
Section s = doc.getSections().get(n);
for (int i = 0; i < s.getParagraphs().getCount(); i++) {
Paragraph para = s.getParagraphs().get(i);
for (int j = 0, cnt = para.getChildObjects().getCount(); j < cnt; j++) {
ParagraphBase pBase = (ParagraphBase) para.getChildObjects().get(j);
if (pBase instanceof Footnote) {
Footnote fn = (Footnote) pBase;
if (fn.getFootnoteType() == FootnoteType.Footnote) {
StringBuilder fnText = new StringBuilder();
for (int k = 0; k < fn.getTextBody().getParagraphs().getCount(); k++) {
fnText.append(fn.getTextBody().getParagraphs().get(k).getText());
}
sb.append("Footnote:"+ fnText.toString() + "\nFootnoteID:" + fn.getId() + "\n");
}
if (fn.getFootnoteType() == FootnoteType.Endnote) {
StringBuilder enText = new StringBuilder();
for (int k = 0; k < fn.getTextBody().getParagraphs().getCount(); k++) {
enText.append(fn.getTextBody().getParagraphs().get(k).getText());
}
sb.append("Endnote:"+ enText.toString() + "\nEndnoteID:" + fn.getId() + "\n");
}
}
}
}
}
|
| New Feature | SPIREDOC-11878 | Added support for the “Embed only characters used in the document” setting.
doc.setEmbedFontsInFile(true); doc.setSaveSubsetFonts(true); |
| Bug Fix | SPIREDOC-11829 | Fixed an issue with inconsistent formatting when converting Word to PDF. |
| Bug Fix | SPIREDOC-11899 | Fixed an issue with blurry images when converting Word to PDF. |