summaryrefslogtreecommitdiff
path: root/vcl/source/filter/ipdf
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/filter/ipdf')
-rw-r--r--vcl/source/filter/ipdf/pdfread.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index cc63415eba6d..6bd1f6f524a8 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -101,6 +101,13 @@ VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic)
rGraphic = aMtf;
+ // Save the original PDF stream for later use.
+ rStream.Seek(STREAM_SEEK_TO_END);
+ uno::Sequence<sal_Int8> aPdfData(rStream.Tell());
+ rStream.Seek(STREAM_SEEK_TO_BEGIN);
+ rStream.ReadBytes(aPdfData.getArray(), aPdfData.getLength());
+ rGraphic.setPdfData(aPdfData);
+
return true;
}