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