How do I access /PieceInfo (private application) dictionary?

Q:
How do I access /PieceInfo (private application) dictionary?
------
A:

You can access PieceInfo dictionary using SDF/Cos API (www.pdftron.com/
net/faq.html#what_sdf).

A page-piece dictionary can be used to hold private application data.
The data can be associated with a page or form XObject by means of the
optional PieceInfo entry in the page object, form dictionary, or
document catalog.

For example, to access PieceInfo in a given page object use:

// In C#
Obj piece_nfo = page.GetSDFObj().FindObj("PieceInfo");
if (piece_nfo != null) {
  ... extract data from piece_nfo dictioanary.
  // For examples of how to use SDF/Cos API please see
  // www.pdftron.com/net/usermanual.html#sdf_objs
}

Similarly to access PieceInfo in a document catalog use the following
line:

Obj piece_nfo = pdfdoc.GetRoot().FindObj("PieceInfo");
if (piece_nfo != null) {
...
}