summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-06-09 13:09:35 -0400
committerJan Holesovsky <kendy@collabora.com>2019-04-03 17:54:00 +0200
commit5a1f367b5573293cf3b2e8dbdffc7de22e99c058 (patch)
treecc43148087a3c2317905b4b0aa4c493cc024bd07 /include/vcl
parent81ac2da0d0325fc74fafd09bc4f3c85a75fab352 (diff)
pdfium: Import PDF with unloaded images.
Change-Id: I5e4a16ff38b9643127ce16879b35f456c13bcff8 Reviewed-on: https://gerrit.libreoffice.org/56268 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/pdfread.hxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/vcl/pdfread.hxx b/include/vcl/pdfread.hxx
index c491f50ef34b..e579f435261e 100644
--- a/include/vcl/pdfread.hxx
+++ b/include/vcl/pdfread.hxx
@@ -13,6 +13,23 @@
#include <vector>
#include <tools/stream.hxx>
#include <vcl/graph.hxx>
+#include <tools/gen.hxx>
+
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace uno
+{
+template <typename> class Sequence;
+}
+}
+}
+}
+class Bitmap;
+class Graphic;
namespace vcl
{
@@ -34,6 +51,14 @@ VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic,
VCL_DLLPUBLIC size_t ImportPDF(const OUString& rURL, std::vector<Bitmap>& rBitmaps,
css::uno::Sequence<sal_Int8>& rPdfData,
const double fResolutionDPI = 96.);
+
+/// Import PDF as Graphic images (1 per page), all unloaded.
+/// Since Graphic is unloaded, we need to return the page size (in pixels) separately.
+/// Does not set rPdfData if no conversion is done.
+/// Returns the number of pages read.
+VCL_DLLPUBLIC size_t ImportPDFUnloaded(const OUString& rURL,
+ std::vector<std::pair<Graphic, Size>>& rGraphics,
+ const double fResolutionDPI = 96.);
}
#endif // INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX