Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Print from postscript file
Qt 6.11 is out! See what's new in the release blog

Print from postscript file

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Roy44R Offline
    Roy44R Offline
    Roy44
    wrote on last edited by
    #1

    Hi,

    Is it possible to print FROM postscript file with Qt ?

    regards,
    thanks.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      In Qt4.8 there was
      printer.setOutputFormat(QPrinter::PostScriptFormat);

      QPrinter printer(QPrinter::HighResolution);
      printer.setOutputFormat(QPrinter::PostScriptFormat);
      printer.setOutputFileName(m_currentTopic+".ps");
      qreal xmargin = contentRect.width()*0.01;
      qreal ymargin = contentRect.height()*0.01;
      printer.setPaperSize(10*contentRect.size()*1.02,QPrinter::DevicePixel);
      printer.setPageMargins(xmargin,ymargin,xmargin,ymargin,QPrinter::DevicePixel);
      QPainter painter;
      painter.begin(&printer);
      render(&painter,QRectF(QPointF(0,0),10*contentRect.size()),contentRect);
      painter.end();
      

      But it have since been removed it seems. Also this was for creation only, i think.

      There is
      http://soft.proindependent.com/eps/

      But a truely free version , i would look at
      https://www.ghostscript.com/

      Also im not sure with you use case.
      If you have PS files AND a PS printer (with ps driver) you can actually send it directly to it
      as file/text stream and it will print it.
      copy filename \machinename\printersharename

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved