Release iText 5.1.1
We're releasing iText 5.1.1 because XML Worker 1.0.0 depends on some new functionality that was added to iText.
iText® XML Worker is no longer in beta. You can now start using XML Worker 1.0.0 in a production environment to create PDF files using HTML created using CKEditor or TinyMCE as input.
Changelog:
iText 5.1.1 Core
- Changes made by Balder
- Added high level api interfaces
Indentable
andSpaceable
. This makes it easier to apply styles in XML Worker. - Extended Logging to work like logging frameworks do.
- Added a simple
System.out
logger:SysoLogger
- Added a
WriterOperation
interface, and an abstractWritableDirectElement
class that should implement it. This object allows XML Worker to do operations on a writer/document, similar to whatVerticalPositionMark
does, but different.
- Added high level api interfaces
- Changes by Paulo Soares
- An incomplete ToUnicode cmap would prevent the correct text extraction.
- Fixed problem where an Exception was thrown in the edge condition where renderInfo.getText() returns an empty string.
- Changes made by Bruno
- Bugfix
Rectangle
: the parameters defining the lower-left coordinate weren't taken into account - Restore of some changed XMLs. Fix by Jérôme Marant for Latin (see version 2.1 of the extrajars).
- Normally, a PDF should have the startxref value in the final 1024 bytes. However, some PDF producers create really bad PDFs with plenty of gibberish after the %%EOF marker. With these extra tests, iText will now continue the search for startxref if it can't be found in the final 1024 bytes.
- Bugfix: List symbol attributes were ignored. Bug reported by Emiel Ackermann.
- Changed
HashMap
intoMap
in thesetMoreInfo()
method (and related variables/methods). - Changed the place where the Info dictionary is updated. This should make the XMP stream consistent with the updated Info dictionary.
- Bugfix in
PdfLayer
andPdfWriter
: The/Usage
of an OCG layer doesn't have to be a direct object; it can also be an indirect reference. - Bugfix in
PdfWriter
: The/D
and/AS
in the context of OCG don't have to be direct objects; it can also be indirect references. PdfPCell
: the default for using the ascender/descender is set to true.- Added
PdfConcatenate
: a class with the same functionality asPdfCopy
/PdfSmartCopy
, but in a more user-friendly way. - When calculating the leading of a line, the image height only has to be taken into account if the changeLeading variable is set for Image chunks.
- Bugfix
XML Worker 1.0.0
- Changes made by Balder Van Camp & Emiel Ackermann
- Table Improvements
- Background colors of tables are fixed.
- Problem with table margin top has been solved.
- Table top and bottom margins now act more as is the case in HTML.
- Default height cell acts more as in HTML.
- Last cell in row now has the correct start width.
- Adjusted HtmlCellCssApplier to the new changes in iText concerning ascender and descender of a cell.
- Bug fix: Setting the color of table borders caused the borders to be drawn even if the border width was zero.
- List Improvements
- Matched the font size of the list symbol to the font size of the content of a list.
- List symbols are now shrunk and aligned in the middle of the line.
- Invalid html tags inside
- (like a
not wrapped in a
- , will be converted to a ListItem.
- (like a
- Various other improvements/changes
- Horizontal rule is now positioned correctly.
- Fixed a bug where CSS styles were not selected in the right order.
- XML Worker specific css styles ‘repeat-header’ and ‘repeat-footer’ implemented in tables.
- Directcontent is now added.
- We put error messages in resource bundles. (feel free to send in translations)
- Introduced the
Pipeline
. A way to separate the processing of the tags and content on basis of what should be done with it. - Removed
TagListener
s,Pipeline
s do their job now. - The
XMLWorkerConfiguration
is replaced with configuration usingPipeline
s. - Added a
LinkProvider
and an ImageProvider. - An
AbstractImageProvider
that only requires an image root to be implemented. - Added a lot of Javadoc.
- Add extra examples and tess
- Change the
XMLParser
to pass the content as abyte[]
allowing pipelines to convert toString
s properly. - Bug fix: any tag at the highest level can contain a relative width
- private constructor for
CSS
andHTML
since these classes should not be initialized - Fixed a todo by adding a ImageProvider possibility for retrieving a list symbol from an image.
- changed the key restriction for the WorkerContext from Class<?> to String, this will allow the same pipeline to be added more then once (if the getContextKey method returns something unique per instance which it does not by default (default is in AbstractPipeline. )
- removed
isStackowner()
(returnedtrue
) fromHorizontalRule
- Removed start from Anchor tag processor, added the CSS setting of underline/blue in the start method as settings in the default css.
- promoted 1
addProcessor()
method to the interface, added aremove()
method to theTagProcessorFactory
, (in case somebody needs it) but one could also override the mapping instead of removing.
- Table Improvements
XML Worker 0.9.2
- Changes made by Balder Van Camp & Emiel Ackermann
Body
now usesnonewlineparagraph
- XML parser takes namespaces into account: tag
<ns:atag>
is now parsed asatag
with namespacens
. - Rowspan fix when determining and comparing the width of cell with its predecessors. Rowspan is now checked not only for the current column, but for the following columns as well.
Table
/TableData
/TableRowElement
:- revised
Table
after receivingIndexOutOfBounds
Table
should now keep working even with inner non table tags. e.g. a<p>
in<table>
, they will all be taken as caption for the table though.Table
code adapted to allow page-break-before on<table>
- didn’t test what happens when it’s on
<td>
’s yet.
- revised
XMLWorkerHelper
– removed deprecated methods- pom: add osgi data
- xmlworker-html: allow parsing snippets with no root tag
page-break-before
can addChunk
element to currentContent list -> stackKeeping processors should check for other then the expected elements (like inOrderUnoderedList
). We probably need to check that in Table tag processor too