code: def export(self, fileName=None):
      printer = QtGui.QPrinter(QtGui.QPrinter.HighResolution)
      dialog = QtGui.QPrintDialog(printer)
      dialog.setWindowTitle(translate("Exporter", "Print Document"))
      if dialog.exec_() != QtWidgets.QDialog.DialogCode.Accepted:
          return
  
      res = QtGui.QGuiApplication.primaryScreen().physicalDotsPerInchX()
      printer.setResolution(res)
      rect = printer.pageRect()
      center = rect.center()
      h = self.params["height"] * res * 100.0 / 2.54
      w = self.params["width"] * res * 100.0 / 2.54
      x = center.x() - w / 2.0
      y = center.y() - h / 2.0
  
      targetRect = QtCore.QRect(x, y, w, h)
      sourceRect = self.getSourceRect()
      painter = QtGui.QPainter(printer)
      try:
          self.setExportMode(True, {"painter": painter})
          self.getScene().render(
              painter,
              QtCore.QRectF(targetRect),
              QtCore.QRectF(sourceRect),
          )
      finally:
          self.setExportMode(False)
      painter.end()
  
file_path: pyqtgraph/pyqtgraph/exporters/PrintExporter.py
imports: from ..parametertree import Parameter
  from ..Qt import QtCore, QtGui, QtWidgets
  from .Exporter import Exporter
label_desc: Use image node_id 5 for calling the PrintExporter obj's underlying member method code with example usage: obj.export(fileName) without return types