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 #include <vcl/graph.hxx>
18 #include <com/sun/star/util/DateTime.hpp>
19 
20 namespace com::sun::star::uno
21 {
22 template <typename> class Sequence;
23 }
24 class Bitmap;
25 
26 namespace vcl
27 {
29 VCL_DLLPUBLIC size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector<Bitmap>& rBitmaps,
30  size_t nFirstPage = 0, int nPages = 1,
31  double fResolutionDPI = 96.);
32 
34 VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic);
35 
37 {
38  OUString maAuthor;
39  OUString maText;
40  // In HMM
42  css::util::DateTime maDateTime;
43 };
44 
46 {
48  // Size in HMM
50 
51  std::vector<PDFGraphicAnnotation> maAnnotations;
52 
53  PDFGraphicResult(Graphic const& rGraphic, Size const& rSize,
54  std::vector<PDFGraphicAnnotation> const& aAnnotations)
55  : maGraphic(rGraphic)
56  , maSize(rSize)
57  , maAnnotations(aAnnotations)
58  {
59  }
60 };
61 
64 VCL_DLLPUBLIC size_t ImportPDFUnloaded(const OUString& rURL,
65  std::vector<PDFGraphicResult>& rGraphics);
66 }
67 
68 #endif // INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX
69 
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
basegfx::B2DRectangle maRectangle
Definition: pdfread.hxx:41
css::util::DateTime maDateTime
Definition: pdfread.hxx:42
PDFGraphicResult(Graphic const &rGraphic, Size const &rSize, std::vector< PDFGraphicAnnotation > const &aAnnotations)
Definition: pdfread.hxx:53
std::vector< PDFGraphicAnnotation > maAnnotations
Definition: pdfread.hxx:51
size_t ImportPDFUnloaded(const OUString &rURL, std::vector< PDFGraphicResult > &rGraphics)
Import PDF as Graphic images (1 per page), but not loaded yet.
Definition: pdfread.cxx:229
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:149
bool ImportPDF(SvStream &rStream, Graphic &rGraphic)
Imports a PDF stream into rGraphic as VectorGraphicData.
Definition: pdfread.cxx:216