Bump version to 6.4-15
[LibreOffice.git] / include / vcl / pdfread.hxx
blob69fec6241f23d5845a28454fc1861f700bb5b70d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX
11 #define INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX
13 #include <vector>
14 #include <tools/gen.hxx>
15 #include <tools/stream.hxx>
16 #include <vcl/graph.hxx>
17 #include <basegfx/range/b2drectangle.hxx>
18 #include <com/sun/star/util/DateTime.hpp>
19 #include <basegfx/tuple/b2dtuple.hxx>
21 namespace com::sun::star::uno
23 template <typename> class Sequence;
25 class Bitmap;
27 namespace vcl
29 /// Fills the rBitmaps vector with rendered pages.
30 VCL_DLLPUBLIC size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector<Bitmap>& rBitmaps,
31 size_t nFirstPage = 0, int nPages = 1,
32 const basegfx::B2DTuple* pSizeHint = nullptr);
34 /// Imports a PDF stream into rGraphic as VectorGraphicData.
35 VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic);
37 struct PDFGraphicAnnotation
39 OUString maAuthor;
40 OUString maText;
41 // In HMM
42 basegfx::B2DRectangle maRectangle;
43 css::util::DateTime maDateTime;
46 struct PDFGraphicResult
48 Graphic maGraphic;
49 // Size in HMM
50 Size maSize;
52 std::vector<PDFGraphicAnnotation> maAnnotations;
54 PDFGraphicResult(Graphic const& rGraphic, Size const& rSize,
55 std::vector<PDFGraphicAnnotation> const& aAnnotations)
56 : maGraphic(rGraphic)
57 , maSize(rSize)
58 , maAnnotations(aAnnotations)
63 /// Import PDF as Graphic images (1 per page), but not loaded yet.
64 /// Returns the number of pages read.
65 VCL_DLLPUBLIC size_t ImportPDFUnloaded(const OUString& rURL,
66 std::vector<PDFGraphicResult>& rGraphics);
69 #endif // INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */