1

What is the interest of using MarkedObject in itext pdf ? Show a main use example please. There is only javadoc on the net related to this object.

Valeriane
  • 936
  • 3
  • 16
  • 37

1 Answers1

1

The MarkedObject class was introduced to allow developers to add attributes to an object when creating XML or HTML. For instance: when you created HTML, you could add an id or class attribute. This use case has disappeared in 2009 when we removed XML and HTML generation from iText.

We thought it could also be used in the context of PDF, more specifically in the context of generating PDF/A. However, we decided to create PDF/A in a difference way, using the IAccessibleElement interface. If you check the API docs, you see that this interface also defines methods to set and get attributes.

In short: you can safely ignore the MarkedObject class: it is no longer used. Writing a "main use example" would be a waste of time.

Bruno Lowagie
  • 75,994
  • 9
  • 109
  • 165