Skip to content
Browse files

Support the sizes of sheets other than A4.

  • Loading branch information...
1 parent 7efb24e commit 165f64a13133c989d14ffd63a707703d88a893c9 @SokoloffA SokoloffA committed Apr 2, 2013
Showing with 6 additions and 8 deletions.
  1. +6 −8 gui/psrender.cpp
View
14 gui/psrender.cpp
@@ -331,17 +331,15 @@ QList<QByteArray> PsRenderPrivate::gsArgs()
args << "-sDEVICE=display";
// Quality vs speed
- //args << QString("-r%1x%2").arg(200).toLatin1();
args << QString("-r%1x%2").arg(150).toLatin1();
- //"-g%dx%d", sWidth, sHeight); // Size of page
- //"-r%fx%f", sWidth * mXDpi , scale * mYDpi );
- //"-r%fx%f", scale * mXDpi, scale * mYDpi);
+ QSizeF pageSize = mProject->printer()->paperSize(Printer::Point);
+ args << QString("-dDEVICEWIDTHPOINTS=%1").arg(pageSize.width()).toAscii();
+ args << QString("-dDEVICEHEIGHTPOINTS=%1").arg(pageSize.height()).toAscii();
- //if (mUsePlatformFonts == FALSE)
- // sprintf(args[arg++], "-dNOPLATFONTS");
+ //args << QString("-dDEVICEWIDTH=%1").arg(pageSize.width()).toAscii();
+ //args << QString("-dDEVICEHEIGHT=%1").arg(pageSize.height()).toAscii();
- //"-dDEVICEWIDTHPOINTS=%d", width); Размеры страницы, перекрывают размеры прописанные в PS.
//"-dDEVICEHEIGHTPOINTS=%d", height);
//"-dDEVICEWIDTH=%d", width);
//"-dDEVICEHEIGHT=%d", height);
@@ -392,7 +390,7 @@ void PsRenderPrivate::run()
// Init .....................................
gsRes = gsapi_init_with_args(mGsInstance, argc, argv);
- if (gsRes < -100)
+ if (gsRes < 0)
{
qWarning() << "Error gsapi_init_with_args" << gsRes;
gsapi_delete_instance(mGsInstance);

0 comments on commit 165f64a

Please sign in to comment.
Something went wrong with that request. Please try again.