mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-31 00:06:02 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			79 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			79 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * 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   *
 | |
|  ************************************************************************/
 |