QGIS API Documentation
3.18.1-Zürich (202f1bf7e5)
|
Abstract base class for GeoPDF exporters. More...
#include <qgsabstractgeopdfexporter.h>
Classes | |
struct | ComponentLayerDetail |
Contains details of a particular input component to be used during PDF composition. More... | |
struct | ControlPoint |
Contains details of a control point used during georeferencing GeoPDF outputs. More... | |
struct | ExportDetails |
struct | GeoReferencedSection |
struct | RenderedFeature |
Contains information about a feature rendered inside the PDF. More... | |
struct | VectorComponentDetail |
Contains information relating to a single PDF layer in the GeoPDF export. More... | |
Public Member Functions | |
QgsAbstractGeoPdfExporter ()=default | |
Constructor for QgsAbstractGeoPdfExporter. More... | |
virtual | ~QgsAbstractGeoPdfExporter ()=default |
QString | errorMessage () |
Returns the last error message encountered during the export. More... | |
bool | finalize (const QList< QgsAbstractGeoPdfExporter::ComponentLayerDetail > &components, const QString &destinationFile, const ExportDetails &details) |
To be called after the rendering operation is complete. More... | |
QString | generateTemporaryFilepath (const QString &filename) const |
Returns a file path to use for temporary files required for GeoPDF creation. More... | |
void | pushRenderedFeature (const QString &layerId, const QgsAbstractGeoPdfExporter::RenderedFeature &feature, const QString &group=QString()) |
Called multiple times during the rendering operation, whenever a feature associated with the specified layerId is rendered. More... | |
Static Public Member Functions | |
static bool | compositionModeSupported (QPainter::CompositionMode mode) |
Returns true if the specified composition mode is supported for layers during GeoPDF exports. More... | |
static QString | geoPDFAvailabilityExplanation () |
Returns a user-friendly, translated string explaining why GeoPDF export support is not available on the current QGIS build (or an empty string if GeoPDF support IS available). More... | |
static bool | geoPDFCreationAvailable () |
Returns true if the current QGIS build is capable of GeoPDF support. More... | |
Friends | |
class | TestQgsGeoPdfExport |
class | TestQgsLayoutGeoPdfExport |
Abstract base class for GeoPDF exporters.
The base class handles generic GeoPDF export setup, cleanup and processing steps.
This class is a low level implementation detail only. Generally, you should use the high level interface exposed by classes like QgsLayoutExporter instead.
Definition at line 54 of file qgsabstractgeopdfexporter.h.
|
default |
Constructor for QgsAbstractGeoPdfExporter.
|
virtualdefault |
|
static |
Returns true
if the specified composition mode is supported for layers during GeoPDF exports.
Definition at line 142 of file qgsabstractgeopdfexporter.cpp.
|
inline |
Returns the last error message encountered during the export.
Definition at line 307 of file qgsabstractgeopdfexporter.h.
bool QgsAbstractGeoPdfExporter::finalize | ( | const QList< QgsAbstractGeoPdfExporter::ComponentLayerDetail > & | components, |
const QString & | destinationFile, | ||
const ExportDetails & | details | ||
) |
To be called after the rendering operation is complete.
Will export the list of PDF layer components to a new PDF file at destinationFile. The components argument gives a list of additional layers to include in the generated PDF file. These must have already been created, e.g. as a result of rendering layers to separate PDF source files.
Any features previously collected by calls to pushRenderedFeature() will be included automatically in the GeoPDF export.
Returns true
if the operation was successful, or false
if an error occurred. If an error occurred, it can be retrieved by calling errorMessage().
Definition at line 87 of file qgsabstractgeopdfexporter.cpp.
QString QgsAbstractGeoPdfExporter::generateTemporaryFilepath | ( | const QString & | filename | ) | const |
Returns a file path to use for temporary files required for GeoPDF creation.
Definition at line 137 of file qgsabstractgeopdfexporter.cpp.
|
static |
Returns a user-friendly, translated string explaining why GeoPDF export support is not available on the current QGIS build (or an empty string if GeoPDF support IS available).
Definition at line 63 of file qgsabstractgeopdfexporter.cpp.
|
static |
Returns true
if the current QGIS build is capable of GeoPDF support.
If false
is returned, a user-friendly explanation why can be retrieved via geoPDFAvailabilityExplanation().
Definition at line 38 of file qgsabstractgeopdfexporter.cpp.
void QgsAbstractGeoPdfExporter::pushRenderedFeature | ( | const QString & | layerId, |
const QgsAbstractGeoPdfExporter::RenderedFeature & | feature, | ||
const QString & | group = QString() |
||
) |
Called multiple times during the rendering operation, whenever a feature associated with the specified layerId is rendered.
The optional group argument can be used to differentiate features from the same layer exported multiple times as part of different layer groups.
Definition at line 167 of file qgsabstractgeopdfexporter.cpp.
|
friend |
Definition at line 375 of file qgsabstractgeopdfexporter.h.
|
friend |
Definition at line 374 of file qgsabstractgeopdfexporter.h.