Docentric Toolkit 2.1 has been released
Document Concatenation and combining
We added full programmatic support for combining documents. With the new functionality you will now be able to combine, merge, insert and append documents in many different ways. The functionality is powerful and flexible enough to implement any document merging scneario that you might think of: from simple document appending to complex insertions of parts of a source document into a designated point in the target document and all this with being able to control various aspects of the merging process, such as how styles are merged or where the appended document begins in the target document. You can use document combining functionality through Document.Concatenate
, Document.Append
and Document.Import
methods.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
// Load test documents. Document document1 = Document.Load("c:\Test1.docx"); Document document2 = Document.Load("c:\Test2.docx"); Document document3 = Document.Load("c:\Test3.docx"); // Set the options that will control the concatenation process. ImportOptions importOptions = new ImportOptions() { ImportStyleMode = ImportStyleMode.CopySourceDocumentStyles, ImportedDocumentDelimiter = ImportedDocumentDelimiter.SourceDocumentStartingSection, ImportedDocumentPageNumbering = ImportedDocumentPageNumbering.ForceRestart }; // Concatenate/append all 3 documents into a single one. Document resultingDocument = Document.Concatenate(new[] { document1, document2, document3, document1 }, importOptions); // Save the resulting document to disk. resultingDocument.Save("c:\Result.pdf"); |
Much improved PDF/XPS rendering fidelity
A lot of improvements have been done in tearms of rendering fidelity. We added support for many previously unsupported document features and also fixed many misbehaviors. If you use more advanced features in your documents, such as dynamic fields (TOC), conditional table styles or continuous section breaks, we urge you to migrate to the new version.
Also, if you use DOM (Document Object Model) to convert documents from DOCX to PDF, you will notice that the converted documents look the same for the majority of the input documents.
Saving to DocX now fully supported
Previously, when saving a DOM document via the Document.Save
, you were able to choose PDF, XPS or DOCX as the output format. While PDF and XPS formats have been fully supported, the DOCX support was poor. With the version 2.1 the DOCX format is now fully supported which means that all features that are represented by DOM are properly saved to DOCX.
1 |
document.Save("c:\Document1.docx", SaveOptions.Word); |
or just
1 |
document.Save("c:\Document1.docx"); |