1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/pdf/qgspdfrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsPdfRenderer
{
%Docstring(signature="appended")
Utility class for rendering PDF documents.
This functionality is not available on all platforms -- it requires a
build with the PDF4Qt library support enabled. On other platforms
calling these methods will raise a :py:class:`QgsNotSupportedException`.
.. versionadded:: 3.36
%End
%TypeHeaderCode
#include "qgspdfrenderer.h"
%End
public:
QgsPdfRenderer( const QString &path );
%Docstring
Constructs a PDF renderer for the file at the specified ``path``.
%End
~QgsPdfRenderer();
QString path() const;
%Docstring
Returns the file path of the associated PDF file.
%End
int pageCount() const throw( QgsNotSupportedException );
%Docstring
Returns the number of pages in the PDF.
:raises QgsNotSupportedException: on QGIS builds without PDF4Qt library
support.
%End
QRectF pageMediaBox( int pageNumber ) const throw( QgsNotSupportedException );
%Docstring
Returns the media box for the specified page. Units are in PDF points.
:raises QgsNotSupportedException: on QGIS builds without PDF4Qt library
support.
%End
bool render( QPainter *painter, const QRectF &painterRect, int pageIndex ) throw( QgsNotSupportedException );
%Docstring
Renders the PDF from the specified ``path`` to a ``painter``.
The ``painterRect`` argument specifies the target rectangle for the PDF
page in ``painter`` coordinates.
:raises QgsNotSupportedException: on QGIS builds without PDF4Qt library
support.
%End
private:
QgsPdfRenderer( const QgsPdfRenderer &other );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/pdf/qgspdfrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|