qpdfwriter.sip 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // qpdfwriter.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtGui Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. class QPdfWriter : public QObject, public QPagedPaintDevice
  22. {
  23. %TypeHeaderCode
  24. #include <qpdfwriter.h>
  25. %End
  26. public:
  27. explicit QPdfWriter(const QString &filename);
  28. explicit QPdfWriter(QIODevice *device);
  29. virtual ~QPdfWriter();
  30. QString title() const;
  31. void setTitle(const QString &title);
  32. QString creator() const;
  33. void setCreator(const QString &creator);
  34. virtual bool newPage();
  35. protected:
  36. virtual QPaintEngine *paintEngine() const;
  37. virtual int metric(QPaintDevice::PaintDeviceMetric id) const;
  38. public:
  39. void setResolution(int resolution);
  40. int resolution() const;
  41. void setPdfVersion(QPagedPaintDevice::PdfVersion version);
  42. QPagedPaintDevice::PdfVersion pdfVersion() const;
  43. void setDocumentXmpMetadata(const QByteArray &xmpMetadata);
  44. QByteArray documentXmpMetadata() const;
  45. void addFileAttachment(const QString &fileName, const QByteArray &data, const QString &mimeType = QString());
  46. %If (Qt_6_8_0 -)
  47. QUuid documentId() const;
  48. %End
  49. %If (Qt_6_8_0 -)
  50. void setDocumentId(QUuid documentId);
  51. %End
  52. %If (Qt_6_8_0 -)
  53. enum class ColorModel
  54. {
  55. RGB,
  56. Grayscale,
  57. CMYK,
  58. Auto,
  59. };
  60. %End
  61. %If (Qt_6_8_0 -)
  62. QPdfWriter::ColorModel colorModel() const;
  63. %End
  64. %If (Qt_6_8_0 -)
  65. void setColorModel(QPdfWriter::ColorModel model);
  66. %End
  67. %If (Qt_6_8_0 -)
  68. QPdfOutputIntent outputIntent() const;
  69. %End
  70. %If (Qt_6_8_0 -)
  71. void setOutputIntent(const QPdfOutputIntent &intent);
  72. %End
  73. %If (Qt_6_9_0 -)
  74. QString author() const;
  75. %End
  76. %If (Qt_6_9_0 -)
  77. void setAuthor(const QString &author);
  78. %End
  79. };