THotPDF.SaveLoadedDocumentToStream Method
procedure SaveLoadedDocumentToStream(Destination: TStream);
Carries out a full loaded-document rewrite into a caller-owned stream and materialises compressed objects before writing
The method refuses a nil destination or a document currently between BeginDoc and EndDoc
Decoded stream caches are released after saving when ReleaseDecodedStreamsAfterSave is switched on