1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
12 #include <o3tl/unit_conversion.hxx>
13 #include <tools/stream.hxx>
14 #include <vcl/BinaryDataContainer.hxx>
18 /// Convert to inch, then apply custom resolution.
19 inline double pointToPixel(const double fPoint
, const double fResolutionDPI
)
21 return o3tl::convert(fPoint
, o3tl::Length::pt
, o3tl::Length::in
) * fResolutionDPI
;
24 /// Decide if PDF data is old enough to be compatible.
25 bool isCompatible(SvStream
& rInStream
, sal_uInt64 nPos
, sal_uInt64 nSize
);
27 /// Converts to highest supported format version (currently 1.6).
28 /// Usually used to deal with missing referenced objects in the
29 /// source pdf stream.
30 bool convertToHighestSupported(SvStream
& rInStream
, SvStream
& rOutStream
);
32 /// Takes care of transparently downgrading the version of the PDF stream in
33 /// case it's too new for our PDF export.
34 bool getCompatibleStream(SvStream
& rInStream
, SvStream
& rOutStream
);
36 BinaryDataContainer
createBinaryDataContainer(SvStream
& rStream
);
38 } // end of vcl::filter::ipdf namespace
40 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */