diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-06-09 13:09:35 -0400 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2019-08-25 13:31:53 +0200 |
commit | 9194f019afb0599d5e72476786fabfa996e07f20 (patch) | |
tree | e6c1e044e5f2eca5b52cb938d4fd9a13734096e8 /include | |
parent | e4cec56a699b75102c39f4f80879a8080fc5ecc1 (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)
Change-Id: I5e4a16ff38b9643127ce16879b35f456c13bcff8
Reviewed-on: https://gerrit.libreoffice.org/77688
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@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 |