LibreOffice Module vcl (master) 1
pdfcompat.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#pragma once
11
12#include <config_features.h>
13#include <tools/gen.hxx>
14#include <tools/stream.hxx>
16#include <vcl/graph.hxx>
17
18namespace vcl::pdf
19{
21inline double pointToPixel(const double fPoint, const double fResolutionDPI)
22{
23 return o3tl::convert(fPoint, o3tl::Length::pt, o3tl::Length::in) * fResolutionDPI;
24}
25
27bool isCompatible(SvStream& rInStream, sal_uInt64 nPos, sal_uInt64 nSize);
28
32bool convertToHighestSupported(SvStream& rInStream, SvStream& rOutStream);
33
36bool getCompatibleStream(SvStream& rInStream, SvStream& rOutStream);
37
39
40} // end of vcl::filter::ipdf namespace
41
42/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Container for the binary data, whose responsibility is to manage the make it as simple as possible to...
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
bool convertToHighestSupported(SvStream &rInStream, SvStream &rOutStream)
Converts to highest supported format version (1.6).
Definition: pdfcompat.cxx:43
double pointToPixel(const double fPoint, const double fResolutionDPI)
Convert to inch, then assume 96 DPI.
Definition: pdfcompat.hxx:21
BinaryDataContainer createBinaryDataContainer(SvStream &rStream)
Definition: pdfcompat.cxx:93
bool isCompatible(SvStream &rInStream, sal_uInt64 nPos, sal_uInt64 nSize)
Decide if PDF data is old enough to be compatible.
Definition: pdfcompat.cxx:19
bool getCompatibleStream(SvStream &rInStream, SvStream &rOutStream)
Takes care of transparently downgrading the version of the PDF stream in case it's too new for our PD...
Definition: pdfcompat.cxx:78