diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-06-09 13:09:35 -0400 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-03-21 15:49:26 +0100 |
commit | ae8917f5e38af25cf0af51f5c01f23c702ed15e2 (patch) | |
tree | 62f8b497ae476809404b36ebbfef5545faae46cd /include | |
parent | 85e51434cf2529dfd247a9580ca749f33b602375 (diff) |
pdfium: Import PDF with unloaded images.
Reviewed-on: https://gerrit.libreoffice.org/56268
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit e07561d2ae743b208a0807ef32d7f011614b73e5)
Reviewed-on: https://gerrit.libreoffice.org/77688
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit 9194f019afb0599d5e72476786fabfa996e07f20)
Change-Id: I5e4a16ff38b9643127ce16879b35f456c13bcff8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90834
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/pdfread.hxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/vcl/pdfread.hxx b/include/vcl/pdfread.hxx index 1de9cfc9b259..1e555d9841c7 100644 --- a/include/vcl/pdfread.hxx +++ b/include/vcl/pdfread.hxx @@ -11,6 +11,7 @@ #define INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX #include <vector> +#include <tools/gen.hxx> #include <tools/stream.hxx> namespace com @@ -45,7 +46,16 @@ VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Bitmap& rBitmap, size_t nPageInd VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic, double fResolutionDPI = 96.); VCL_DLLPUBLIC size_t ImportPDF(const OUString& rURL, std::vector<Bitmap>& rBitmaps, - css::uno::Sequence<sal_Int8>& rPdfData, double fResolutionDPI = 96.); + 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 |