I found three problems with the PdfDestination class.
1) It doesn't support specifying nulls with /XYZ. Using null means that
a value is left unchanged. I'm not sure what would be the best interface
for this. It'll probably require a new constructor and
IsLeftNull/IsTopNull (a null zoom is the same as 0 zoom).
2) All of the constructors (except those that take an existing object)
create a new object in the PDF. The AddToDictionary method copies the
object by value, and so it remains unused in the final document.
The fix is to replace the m_array member with a PdfObject. Then we can
take its pointer to use as m_pObject. I wrote a patch for this:
<https://github.com/DankRank/podofo/commit/836b5b12a521a1796670e10106bab94bae6017a6.patch>
3) There's no way to make it output a named destination. The Init
method, which handles initialization from existing PdfObjects, resolves
named destinations, and initializes m_pObject with the underlying array
object. This means that if you do something like
SetDestination(GetDestination()) on an outline item you'll always end up
with an explicit destination. Now, I believe that this isn't a problem
with PdfDestination itself. It'd reasonable to keep it focused on
explicit destinations, and just add new API to PdfOutlineItem and
PdfAnnotation that gets/sets the named destination. (either directly,
using a PdfString, or through a new wrapper class that would represent
either a PdfDestination, a PdfString or PdfName)
P.S. I fairly new to this lib, so apologies if I'm missing something
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users