LibreOffice Module vcl (master)  1
pdfread.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX
11 #define INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX
12 
13 #include <vector>
14 #include <tools/gen.hxx>
15 #include <tools/stream.hxx>
16 
17 namespace com
18 {
19 namespace sun
20 {
21 namespace star
22 {
23 namespace uno
24 {
25 template <typename> class Sequence;
26 }
27 }
28 }
29 }
30 class Bitmap;
31 class Graphic;
32 
33 namespace vcl
34 {
36 VCL_DLLPUBLIC size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector<Bitmap>& rBitmaps,
37  size_t nFirstPage = 0, int nPages = 1,
38  double fResolutionDPI = 96.);
39 
41 VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Bitmap& rBitmap, size_t nPageIndex,
42  std::vector<sal_Int8>& rPdfData,
43  sal_uInt64 nPos = STREAM_SEEK_TO_BEGIN,
44  sal_uInt64 nSize = STREAM_SEEK_TO_END, double fResolutionDPI = 96.);
45 
46 VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic, double fResolutionDPI = 96.);
47 
48 VCL_DLLPUBLIC size_t ImportPDF(const OUString& rURL, std::vector<Bitmap>& rBitmaps,
49  std::vector<sal_Int8>& rPdfData, double fResolutionDPI = 96.);
50 
55 VCL_DLLPUBLIC size_t ImportPDFUnloaded(const OUString& rURL,
56  std::vector<std::pair<Graphic, Size>>& rGraphics,
57  double fResolutionDPI = 96.);
58 }
59 
60 #endif // INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX
61 
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
size_t ImportPDFUnloaded(const OUString &rURL, std::vector< std::pair< Graphic, Size >> &rGraphics, const double fResolutionDPI)
Import PDF as Graphic images (1 per page), all unloaded.
Definition: pdfread.cxx:283
size_t RenderPDFBitmaps(const void *pBuffer, int nSize, std::vector< Bitmap > &rBitmaps, const size_t nFirstPage, int nPages, const double fResolutionDPI)
Fills the rBitmaps vector with rendered pages.
Definition: pdfread.cxx:151
bool ImportPDF(SvStream &rStream, Bitmap &rBitmap, size_t nPageIndex, std::vector< sal_Int8 > &rPdfData, sal_uInt64 nPos, sal_uInt64 nSize, const double fResolutionDPI)
Imports a PDF stream into rGraphic as a GDIMetaFile.
Definition: pdfread.cxx:224