Incremental PDF saving for digital signatures.

Q: is there any way to get a snapshot in PDF format of the in-memory
copy of a document? The saving-to-memory variant of PDFDoc::Save()
cannot be used for that as it disables future incremental saves (which
we need for doing digital signatures).

Alternatively is it possible to save a document incrementally twice,
to two different files?
That is:

   - Copy file A to file T
   - Load document from file T
   - modify document
   - save document incrementally to T
   - save document incrementally to A

In other words: is the increment computed from the current state and
the target file (which makes the above sequence of events work) or is
it just the set of changes made since the document was last loaded/
saved (in which case changes can be saved incrementally only once)?

According to the documentation, loading from T and incrementally
saving to A is not allowed, that is, it's not the contents of the file
that matter but the pathname.
-----
A: Unfortunately the serialized document data is only available in the
external data stream or a buffer.

According to the documentation, loading from T and incrementally
saving to A is not allowed.

This is correct behavior (since PDFNet does not know that A and T are
the same files - which would possibly require a costly check).

You can implement your requirements as follows:

- Copy file A to file T
- Load document from file T
- modify document
- save document incrementally to T
- Rename file T to A, or copy T to A.