Add paper sizes

This commit is contained in:
Anton Thomasson 2020-05-16 15:17:42 +02:00
parent 04c46612c9
commit bd710831eb
12 changed files with 373 additions and 19 deletions

View file

@ -71,7 +71,8 @@ HEADERS += \
ppm2pwg/pwg_pghdr_codable.h \ ppm2pwg/pwg_pghdr_codable.h \
ppm2pwg/urf_pghdr_codable.h \ ppm2pwg/urf_pghdr_codable.h \
ppm2pwg/bytestream/bytestream.h \ ppm2pwg/bytestream/bytestream.h \
ppm2pwg/bytestream/codable.h ppm2pwg/bytestream/codable.h \
src/papersizes.h
INCLUDEPATH += ppm2pwg \ INCLUDEPATH += ppm2pwg \
ppm2pwg/bytestream ppm2pwg/bytestream

View file

@ -32,7 +32,7 @@ Page {
ListModel { ListModel {
id:mod id:mod
ListElement {name: "sides"; prettyName: qsTr("Sides"); tag: 0x23} ListElement {name: "sides"; prettyName: qsTr("Sides"); tag: 0x23}
// ListElement {name: "media"; prettyName: qsTr("Print media"); tag: 0x44} ListElement {name: "media"; prettyName: qsTr("Print media"); tag: 0x44}
ListElement {name: "copies"; prettyName: qsTr("Copies"); tag: 0x21} ListElement {name: "copies"; prettyName: qsTr("Copies"); tag: 0x21}
// ListElement {name: "page-ranges"; prettyName: qsTr("Page range"); tag: 0x33} // ListElement {name: "page-ranges"; prettyName: qsTr("Page range"); tag: 0x33}
ListElement {name: "print-color-mode"; prettyName: qsTr("Color mode"); tag: 0x23} ListElement {name: "print-color-mode"; prettyName: qsTr("Color mode"); tag: 0x23}

View file

@ -1,7 +1,8 @@
#include "convertworker.h" #include "convertworker.h"
#include <sailfishapp.h> #include <sailfishapp.h>
#include "papersizes.h"
void ppm2PwgEnv(QStringList& env, bool urf, quint32 Quality, void ppm2PwgEnv(QStringList& env, bool urf, quint32 Quality, QString PaperSize,
quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble) quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble)
{ {
env.append("HWRES_X="+QString::number(HwResX)); env.append("HWRES_X="+QString::number(HwResX));
@ -17,13 +18,18 @@ void ppm2PwgEnv(QStringList& env, bool urf, quint32 Quality,
env.append("QUALITY="+QString::number(Quality)); env.append("QUALITY="+QString::number(Quality));
} }
if(PaperSize != "")
{
env.append("PAGE_SIZE_NAME="+PaperSize);
}
env.append("DUPLEX="+QString::number(TwoSided)); env.append("DUPLEX="+QString::number(TwoSided));
env.append("TUMBLE="+QString::number(Tumble)); env.append("TUMBLE="+QString::number(Tumble));
} }
void ConvertWorker::convertPdf(QNetworkRequest request, QString filename, QTemporaryFile* tempfile, void ConvertWorker::convertPdf(QNetworkRequest request, QString filename, QTemporaryFile* tempfile,
bool urf, quint32 Colors, quint32 Quality, bool urf, quint32 Colors, quint32 Quality, QString PaperSize,
quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble) quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble)
{ {
if(urf) if(urf)
@ -37,6 +43,35 @@ void ConvertWorker::convertPdf(QNetworkRequest request, QString filename, QTempo
} }
} }
QString ShortPaperSize;
if(PaperSize == "iso_a4_210x297mm")
{
ShortPaperSize = "A4";
}
else if (PaperSize == "iso_a3_297x420mm")
{
ShortPaperSize = "A3";
}
else if (PaperSize == "na_letter_8.5x11in")
{
ShortPaperSize = "letter";
}
else if (PaperSize == "na_legal_8.5x14in")
{
ShortPaperSize = "legal";
}
else
{
qDebug() << "Unsupported PDF paper size" << PaperSize;
tempfile->deleteLater();
emit failed(tr("Unsupported PDF paper size"));
return;
}
QProcess* pdftocairo = new QProcess(this);
pdftocairo->setProgram("pdftocairo");
pdftocairo->setArguments({"-pdf", "-paper", ShortPaperSize, filename, "-"});
QProcess* pdftoppm = new QProcess(this); QProcess* pdftoppm = new QProcess(this);
pdftoppm->setProgram("pdftoppm"); pdftoppm->setProgram("pdftoppm");
QStringList Pdf2PpmArgs = {"-rx", QString::number(HwResX), "-ry", QString::number(HwResY)}; QStringList Pdf2PpmArgs = {"-rx", QString::number(HwResX), "-ry", QString::number(HwResY)};
@ -44,7 +79,6 @@ void ConvertWorker::convertPdf(QNetworkRequest request, QString filename, QTempo
{ {
Pdf2PpmArgs.append("-gray"); Pdf2PpmArgs.append("-gray");
} }
Pdf2PpmArgs.append(filename);
pdftoppm->setArguments(Pdf2PpmArgs); pdftoppm->setArguments(Pdf2PpmArgs);
@ -54,26 +88,34 @@ void ConvertWorker::convertPdf(QNetworkRequest request, QString filename, QTempo
ppm2pwg->setArguments({"ppm2pwg"}); ppm2pwg->setArguments({"ppm2pwg"});
QStringList env; QStringList env;
ppm2PwgEnv(env, urf, Quality, HwResX, HwResY, TwoSided, Tumble); ppm2PwgEnv(env, urf, Quality, PaperSize, HwResX, HwResY, TwoSided, Tumble);
qDebug() << "ppm2pwg env is " << env; qDebug() << "ppm2pwg env is " << env;
ppm2pwg->setEnvironment(env); ppm2pwg->setEnvironment(env);
pdftocairo->setStandardOutputProcess(pdftoppm);
pdftoppm->setStandardOutputProcess(ppm2pwg); pdftoppm->setStandardOutputProcess(ppm2pwg);
ppm2pwg->setStandardOutputFile(tempfile->fileName(), QIODevice::Append); ppm2pwg->setStandardOutputFile(tempfile->fileName(), QIODevice::Append);
connect(pdftocairo, SIGNAL(finished(int, QProcess::ExitStatus)), pdftocairo, SLOT(deleteLater()));
connect(pdftoppm, SIGNAL(finished(int, QProcess::ExitStatus)), pdftoppm, SLOT(deleteLater())); connect(pdftoppm, SIGNAL(finished(int, QProcess::ExitStatus)), pdftoppm, SLOT(deleteLater()));
connect(ppm2pwg, SIGNAL(finished(int, QProcess::ExitStatus)), ppm2pwg, SLOT(deleteLater())); connect(ppm2pwg, SIGNAL(finished(int, QProcess::ExitStatus)), ppm2pwg, SLOT(deleteLater()));
qDebug() << "All connected"; qDebug() << "All connected";
pdftocairo->start();
pdftoppm->start(); pdftoppm->start();
ppm2pwg->start(); ppm2pwg->start();
qDebug() << "Starting"; qDebug() << "Starting";
if(!pdftocairo->waitForStarted())
{
qDebug() << "pdftocairo died";
tempfile->deleteLater();
emit failed(tr("Conversion error"));
return;
}
if(!pdftoppm->waitForStarted()) if(!pdftoppm->waitForStarted())
{ {
qDebug() << "pdftoppm died"; qDebug() << "pdftoppm died";
@ -99,10 +141,21 @@ void ConvertWorker::convertPdf(QNetworkRequest request, QString filename, QTempo
} }
void ConvertWorker::convertImage(QNetworkRequest request, QString filename, QTemporaryFile* tempfile, void ConvertWorker::convertImage(QNetworkRequest request, QString filename, QTemporaryFile* tempfile,
bool urf, quint32 Colors, quint32 Quality, quint32 HwResX, quint32 HwResY) bool urf, quint32 Colors, quint32 Quality, QString PaperSize,
quint32 HwResX, quint32 HwResY)
{ {
quint32 Width = 210.0/25.4*HwResX; if(!PaperSizes.contains(PaperSize))
quint32 Height = 297.0/25.4*HwResY; {
qDebug() << "Unsupported paper size" << PaperSize;
tempfile->deleteLater();
emit failed(tr("Unsupported paper size"));
return;
}
QPair<float,float> wh = PaperSizes[PaperSize];
quint32 Width = qRound(wh.first/25.4*HwResX);
quint32 Height = qRound(wh.second/25.4*HwResY);
qDebug() << "Size is" << Width << "x" << Height;
QImage inImage; QImage inImage;
if(!inImage.load(filename)) if(!inImage.load(filename))
@ -135,7 +188,7 @@ void ConvertWorker::convertImage(QNetworkRequest request, QString filename, QTem
ppm2pwg->setArguments({"ppm2pwg"}); ppm2pwg->setArguments({"ppm2pwg"});
QStringList env; QStringList env;
ppm2PwgEnv(env, urf, Quality, HwResX, HwResY, false, false); ppm2PwgEnv(env, urf, Quality, PaperSize, HwResX, HwResY, false, false);
qDebug() << "ppm2pwg env is " << env; qDebug() << "ppm2pwg env is " << env;
ppm2pwg->setEnvironment(env); ppm2pwg->setEnvironment(env);

View file

@ -9,11 +9,12 @@ class ConvertWorker : public QObject
public slots: public slots:
void convertPdf(QNetworkRequest request, QString filename, QTemporaryFile* tempfile, void convertPdf(QNetworkRequest request, QString filename, QTemporaryFile* tempfile,
bool urf, quint32 Colors, quint32 Quality, bool urf, quint32 Colors, quint32 Quality, QString PaperSize,
quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble); quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble);
void convertImage(QNetworkRequest request, QString filename, QTemporaryFile* tempfile, void convertImage(QNetworkRequest request, QString filename, QTemporaryFile* tempfile,
bool urf, quint32 Colors, quint32 Quality, quint32 HwResX, quint32 HwResY); bool urf, quint32 Colors, quint32 Quality, QString PaperSize,
quint32 HwResX, quint32 HwResY);
signals: signals:
void done(QNetworkRequest request, QTemporaryFile* data); void done(QNetworkRequest request, QTemporaryFile* data);

View file

@ -1,6 +1,7 @@
#include "ippprinter.h" #include "ippprinter.h"
#include <seaprint_version.h> #include <seaprint_version.h>
#include "mimer.h" #include "mimer.h"
#include "papersizes.h"
IppPrinter::IppPrinter() IppPrinter::IppPrinter()
{ {
@ -282,7 +283,7 @@ void IppPrinter::print(QJsonObject attrs, QString filename){
qDebug() << supportedMimeTypes << supportedMimeTypes.contains(mimeType); qDebug() << supportedMimeTypes << supportedMimeTypes.contains(mimeType);
if(from == Image || (from == Pdf && !supportedMimeTypes.contains("application/pdf"))) if(from == Image || (from == Pdf /*&& !supportedMimeTypes.contains("application/pdf")*/))
{ {
if(supportedMimeTypes.contains("image/pwg-raster")) if(supportedMimeTypes.contains("image/pwg-raster"))
{ {
@ -303,6 +304,13 @@ void IppPrinter::print(QJsonObject attrs, QString filename){
QString PrintColorMode = getAttrOrDefault(attrs, "print-color-mode").toString(); QString PrintColorMode = getAttrOrDefault(attrs, "print-color-mode").toString();
quint32 Colors = PrintColorMode=="color" ? 3 : PrintColorMode=="monochrome" ? 1 : 0; quint32 Colors = PrintColorMode=="color" ? 3 : PrintColorMode=="monochrome" ? 1 : 0;
QString PaperSize = getAttrOrDefault(attrs, "media").toString();
if(!PaperSizes.contains(PaperSize))
{
emit convertFailed(tr("Unsupported print media"));
return;
}
if(target != NoConvert) if(target != NoConvert)
{ {
file.close(); file.close();
@ -332,11 +340,12 @@ void IppPrinter::print(QJsonObject attrs, QString filename){
} }
emit doConvertPdf(request, filename, tempfile, target==UrfConvert, Colors, Quality, emit doConvertPdf(request, filename, tempfile, target==UrfConvert, Colors, Quality,
HwResX, HwResY, TwoSided, Tumble); PaperSize, HwResX, HwResY, TwoSided, Tumble);
} }
else if (from == Image) else if (from == Image)
{ {
emit doConvertImage(request, filename, tempfile, target==UrfConvert, Colors, Quality, HwResX, HwResY); emit doConvertImage(request, filename, tempfile, target==UrfConvert, Colors, Quality,
PaperSize, HwResX, HwResY);
} }
} }
else else

View file

@ -53,11 +53,12 @@ signals:
void cancelStatus(bool status); void cancelStatus(bool status);
void doConvertPdf(QNetworkRequest request, QString filename, QTemporaryFile* tempfile, void doConvertPdf(QNetworkRequest request, QString filename, QTemporaryFile* tempfile,
bool urf, quint32 Colors, quint32 Quality, bool urf, quint32 Colors, quint32 Quality, QString PaperSize,
quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble); quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble);
void doConvertImage(QNetworkRequest request, QString filename, QTemporaryFile* tempfile, bool urf, void doConvertImage(QNetworkRequest request, QString filename, QTemporaryFile* tempfile, bool urf,
quint32 Colors, quint32 Quality, quint32 HwResX, quint32 HwResY); quint32 Colors, quint32 Quality, QString PaperSize,
quint32 HwResX, quint32 HwResY);
void busyMessageChanged(); void busyMessageChanged();

209
src/papersizes.h Normal file
View file

@ -0,0 +1,209 @@
#ifndef PAPERSIZES_H
#define PAPERSIZES_H
#include <QMap>
#include <QPair>
static QMap<QString, QPair<float,float>> PaperSizes =
{{"asme_f_28x40in", {71.12, 101.60}},
{"iso_2a0_1189x1682mm", {1189.00, 1682.00}},
{"iso_a0_841x1189mm", {841.00, 1189.00}},
{"iso_a0x3_1189x2523mm", {1189.00, 2523.00}},
{"iso_a10_26x37mm", {26.00, 37.00}},
{"iso_a1_594x841mm", {594.00, 841.00}},
{"iso_a1x3_841x1783mm", {841.00, 1783.00}},
{"iso_a1x4_841x2378mm", {841.00, 2378.00}},
{"iso_a2_420x594mm", {420.00, 594.00}},
{"iso_a2x3_594x1261mm", {594.00, 1261.00}},
{"iso_a2x4_594x1682mm", {594.00, 1682.00}},
{"iso_a2x5_594x2102mm", {594.00, 2102.00}},
{"iso_a3-extra_322x445mm", {322.00, 445.00}},
{"iso_a3_297x420mm", {297.00, 420.00}},
{"iso_a3x3_420x891mm", {420.00, 891.00}},
{"iso_a3x4_420x1189mm", {420.00, 1189.00}},
{"iso_a3x5_420x1486mm", {420.00, 1486.00}},
{"iso_a3x6_420x1783mm", {420.00, 1783.00}},
{"iso_a3x7_420x2080mm", {420.00, 2080.00}},
{"iso_a4-extra_235.5x322.3mm", {235.50, 322.30}},
{"iso_a4-tab_225x297mm", {225.00, 297.00}},
{"iso_a4_210x297mm", {210.00, 297.00}},
{"iso_a4x3_297x630mm", {297.00, 630.00}},
{"iso_a4x4_297x841mm", {297.00, 841.00}},
{"iso_a4x5_297x1051mm", {297.00, 1051.00}},
{"iso_a4x6_297x1261mm", {297.00, 1261.00}},
{"iso_a4x7_297x1471mm", {297.00, 1471.00}},
{"iso_a4x8_297x1682mm", {297.00, 1682.00}},
{"iso_a4x9_297x1892mm", {297.00, 1892.00}},
{"iso_a5-extra_174x235mm", {174.00, 235.00}},
{"iso_a5_148x210mm", {148.00, 210.00}},
{"iso_a6_105x148mm", {105.00, 148.00}},
{"iso_a7_74x105mm", {74.00, 105.00}},
{"iso_a8_52x74mm", {52.00, 74.00}},
{"iso_a9_37x52mm", {37.00, 52.00}},
{"iso_b0_1000x1414mm", {1000.00, 1414.00}},
{"iso_b10_31x44mm", {31.00, 44.00}},
{"iso_b1_707x1000mm", {707.00, 1000.00}},
{"iso_b2_500x707mm", {500.00, 707.00}},
{"iso_b3_353x500mm", {353.00, 500.00}},
{"iso_b4_250x353mm", {250.00, 353.00}},
{"iso_b5-extra_201x276mm", {201.00, 276.00}},
{"iso_b5_176x250mm", {176.00, 250.00}},
{"iso_b6_125x176mm", {125.00, 176.00}},
{"iso_b6c4_125x324mm", {125.00, 324.00}},
{"iso_b7_88x125mm", {88.00, 125.00}},
{"iso_b8_62x88mm", {62.00, 88.00}},
{"iso_b9_44x62mm", {44.00, 62.00}},
{"iso_c0_917x1297mm", {917.00, 1297.00}},
{"iso_c10_28x40mm", {28.00, 40.00}},
{"iso_c1_648x917mm", {648.00, 917.00}},
{"iso_c2_458x648mm", {458.00, 648.00}},
{"iso_c3_324x458mm", {324.00, 458.00}},
{"iso_c4_229x324mm", {229.00, 324.00}},
{"iso_c5_162x229mm", {162.00, 229.00}},
{"iso_c6_114x162mm", {114.00, 162.00}},
{"iso_c6c5_114x229mm", {114.00, 229.00}},
{"iso_c7_81x114mm", {81.00, 114.00}},
{"iso_c7c6_81x162mm", {81.00, 162.00}},
{"iso_c8_57x81mm", {57.00, 81.00}},
{"iso_c9_40x57mm", {40.00, 57.00}},
{"iso_dl_110x220mm", {110.00, 220.00}},
{"iso_id-1_53.98x85.6mm", {53.98, 85.60}},
{"iso_id-3_88x125mm", {88.00, 125.00}},
{"iso_ra0_860x1220mm", {860.00, 1220.00}},
{"iso_ra1_610x860mm", {610.00, 860.00}},
{"iso_ra2_430x610mm", {430.00, 610.00}},
{"iso_ra3_305x430mm", {305.00, 430.00}},
{"iso_ra4_215x305mm", {215.00, 305.00}},
{"iso_sra0_900x1280mm", {900.00, 1280.00}},
{"iso_sra1_640x900mm", {640.00, 900.00}},
{"iso_sra2_450x640mm", {450.00, 640.00}},
{"iso_sra3_320x450mm", {320.00, 450.00}},
{"iso_sra4_225x320mm", {225.00, 320.00}},
{"jis_b0_1030x1456mm", {1030.00, 1456.00}},
{"jis_b10_32x45mm", {32.00, 45.00}},
{"jis_b1_728x1030mm", {728.00, 1030.00}},
{"jis_b2_515x728mm", {515.00, 728.00}},
{"jis_b3_364x515mm", {364.00, 515.00}},
{"jis_b4_257x364mm", {257.00, 364.00}},
{"jis_b5_182x257mm", {182.00, 257.00}},
{"jis_b6_128x182mm", {128.00, 182.00}},
{"jis_b7_91x128mm", {91.00, 128.00}},
{"jis_b8_64x91mm", {64.00, 91.00}},
{"jis_b9_45x64mm", {45.00, 64.00}},
{"jis_exec_216x330mm", {216.00, 330.00}},
{"jpn_chou2_111.1x146mm", {111.10, 146.00}},
{"jpn_chou3_120x235mm", {120.00, 235.00}},
{"jpn_chou40_90x225mm", {90.00, 225.00}},
{"jpn_chou4_90x205mm", {90.00, 205.00}},
{"jpn_hagaki_100x148mm", {100.00, 148.00}},
{"jpn_kahu_240x322.1mm", {240.00, 322.10}},
{"jpn_kaku1_270x382mm", {270.00, 382.00}},
{"jpn_kaku2_240x332mm", {240.00, 332.00}},
{"jpn_kaku3_216x277mm", {216.00, 277.00}},
{"jpn_kaku4_197x267mm", {197.00, 267.00}},
{"jpn_kaku5_190x240mm", {190.00, 240.00}},
{"jpn_kaku7_142x205mm", {142.00, 205.00}},
{"jpn_kaku8_119x197mm", {119.00, 197.00}},
{"jpn_oufuku_148x200mm", {148.00, 200.00}},
{"jpn_you4_105x235mm", {105.00, 235.00}},
{"na_10x11_10x11in", {25.40, 27.94}},
{"na_10x13_10x13in", {25.40, 33.02}},
{"na_10x14_10x14in", {25.40, 35.56}},
{"na_10x15_10x15in", {25.40, 38.10}},
{"na_11x12_11x12in", {27.94, 30.48}},
{"na_11x15_11x15in", {27.94, 38.10}},
{"na_12x19_12x19in", {30.48, 48.26}},
{"na_5x7_5x7in", {12.70, 17.78}},
{"na_6x9_6x9in", {15.24, 22.86}},
{"na_7x9_7x9in", {17.78, 22.86}},
{"na_9x11_9x11in", {22.86, 27.94}},
{"na_a2_4.375x5.75in", {11.11, 14.61}},
{"na_arch-a_9x12in", {22.86, 30.48}},
{"na_arch-b_12x18in", {30.48, 45.72}},
{"na_arch-c_18x24in", {45.72, 60.96}},
{"na_arch-d_24x36in", {60.96, 91.44}},
{"na_arch-e2_26x38in", {66.04, 96.52}},
{"na_arch-e3_27x39in", {68.58, 99.06}},
{"na_arch-e_36x48in", {91.44, 121.92}},
{"na_b-plus_12x19.17in", {30.48, 48.69}},
{"na_c5_6.5x9.5in", {16.51, 24.13}},
{"na_c_17x22in", {43.18, 55.88}},
{"na_d_22x34in", {55.88, 86.36}},
{"na_e_34x44in", {86.36, 111.76}},
{"na_edp_11x14in", {27.94, 35.56}},
{"na_eur-edp_12x14in", {30.48, 35.56}},
{"na_executive_7.25x10.5in", {18.41, 26.67}},
{"na_f_44x68in", {111.76, 172.72}},
{"na_fanfold-eur_8.5x12in", {21.59, 30.48}},
{"na_fanfold-us_11x14.875in", {27.94, 37.78}},
{"na_foolscap_8.5x13in", {21.59, 33.02}},
{"na_govt-legal_8x13in", {20.32, 33.02}},
{"na_govt-letter_8x10in", {20.32, 25.40}},
{"na_index-3x5_3x5in", {7.62, 12.70}},
{"na_index-4x6-ext_6x8in", {15.24, 20.32}},
{"na_index-4x6_4x6in", {10.16, 15.24}},
{"na_index-5x8_5x8in", {12.70, 20.32}},
{"na_invoice_5.5x8.5in", {13.97, 21.59}},
{"na_ledger_11x17in", {27.94, 43.18}},
{"na_legal-extra_9.5x15in", {24.13, 38.10}},
{"na_legal_8.5x14in", {21.59, 35.56}},
{"na_letter-extra_9.5x12in", {24.13, 30.48}},
{"na_letter-plus_8.5x12.69in", {21.59, 32.23}},
{"na_letter_8.5x11in", {21.59, 27.94}},
{"na_monarch_3.875x7.5in", {9.84, 19.05}},
{"na_number-10_4.125x9.5in", {10.48, 24.13}},
{"na_number-11_4.5x10.375in", {11.43, 26.35}},
{"na_number-12_4.75x11in", {12.06, 27.94}},
{"na_number-14_5x11.5in", {12.70, 29.21}},
{"na_number-9_3.875x8.875in", {9.84, 22.54}},
{"na_oficio_8.5x13.4in", {21.59, 34.04}},
{"na_personal_3.625x6.5in", {9.21, 16.51}},
{"na_quarto_8.5x10.83in", {21.59, 27.51}},
{"na_super-a_8.94x14in", {22.71, 35.56}},
{"na_super-b_13x19in", {33.02, 48.26}},
{"na_wide-format_30x42in", {76.20, 106.68}},
{"oe_12x16_12x16in", {30.48, 40.64}},
{"oe_14x17_14x17in", {35.56, 43.18}},
{"oe_18x22_18x22in", {45.72, 55.88}},
{"oe_a2plus_17x24in", {43.18, 60.96}},
{"oe_business-card_2x3.5in", {5.08, 8.89}},
{"oe_photo-10r_10x12in", {25.40, 30.48}},
{"oe_photo-20r_20x24in", {50.80, 60.96}},
{"oe_photo-l_3.5x5in", {8.89, 12.70}},
{"oe_photo-s10r_10x15in", {25.40, 38.10}},
{"oe_square-photo_4x4in", {10.16, 10.16}},
{"oe_square-photo_5x5in", {12.70, 12.70}},
{"om_16k_184x260mm", {184.00, 260.00}},
{"om_16k_195x270mm", {195.00, 270.00}},
{"om_business-card_55x85mm", {55.00, 85.00}},
{"om_business-card_55x91mm", {55.00, 91.00}},
{"om_card_54x86mm", {54.00, 86.00}},
{"om_dai-pa-kai_275x395mm", {275.00, 395.00}},
{"om_dsc-photo_89x119mm", {89.00, 119.00}},
{"om_folio-sp_215x315mm", {215.00, 315.00}},
{"om_folio_210x330mm", {210.00, 330.00}},
{"om_invite_220x220mm", {220.00, 220.00}},
{"om_italian_110x230mm", {110.00, 230.00}},
{"om_juuro-ku-kai_198x275mm", {198.00, 275.00}},
{"om_large-photo_200x300", {200.00, 3.00}},
{"om_medium-photo_130x180mm", {130.00, 180.00}},
{"om_pa-kai_267x389mm", {267.00, 389.00}},
{"om_postfix_114x229mm", {114.00, 229.00}},
{"om_small-photo_100x150mm", {100.00, 150.00}},
{"om_square-photo_89x89mm", {89.00, 89.00}},
{"om_wide-photo_100x200mm", {100.00, 200.00}},
{"prc_10_324x458mm", {324.00, 458.00}},
{"prc_16k_146x215mm", {146.00, 215.00}},
{"prc_1_102x165mm", {102.00, 165.00}},
{"prc_2_102x176mm", {102.00, 176.00}},
{"prc_32k_97x151mm", {97.00, 151.00}},
{"prc_3_125x176mm", {125.00, 176.00}},
{"prc_4_110x208mm", {110.00, 208.00}},
{"prc_5_110x220mm", {110.00, 220.00}},
{"prc_6_120x320mm", {120.00, 320.00}},
{"prc_7_160x230mm", {160.00, 230.00}},
{"prc_8_120x309mm", {120.00, 309.00}},
{"roc_16k_7.75x10.75in", {19.68, 27.30}},
{"roc_8k_10.75x15.5in", {27.30, 39.37}}};
#endif // PAPERSIZES_H

View file

@ -128,6 +128,14 @@
<source>Failed to load image</source> <source>Failed to load image</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Unsupported PDF paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
@ -189,6 +197,10 @@
<source>Failed to open file</source> <source>Failed to open file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Unsupported print media</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>JobsPage</name> <name>JobsPage</name>
@ -247,6 +259,10 @@
<source>Resolution</source> <source>Resolution</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Print media</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>utils</name> <name>utils</name>

View file

@ -128,6 +128,14 @@
<source>Failed to load image</source> <source>Failed to load image</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Unsupported PDF paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
@ -189,6 +197,10 @@
<source>Failed to open file</source> <source>Failed to open file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Unsupported print media</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>JobsPage</name> <name>JobsPage</name>
@ -247,6 +259,10 @@
<source>Resolution</source> <source>Resolution</source>
<translation>Resolución</translation> <translation>Resolución</translation>
</message> </message>
<message>
<source>Print media</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>utils</name> <name>utils</name>

View file

@ -128,6 +128,14 @@
<source>Failed to load image</source> <source>Failed to load image</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Unsupported PDF paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
@ -189,6 +197,10 @@
<source>Failed to open file</source> <source>Failed to open file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Unsupported print media</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>JobsPage</name> <name>JobsPage</name>
@ -247,6 +259,10 @@
<source>Resolution</source> <source>Resolution</source>
<translation>Résolution</translation> <translation>Résolution</translation>
</message> </message>
<message>
<source>Print media</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>utils</name> <name>utils</name>

View file

@ -128,6 +128,14 @@
<source>Failed to load image</source> <source>Failed to load image</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Unsupported PDF paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
@ -189,6 +197,10 @@
<source>Failed to open file</source> <source>Failed to open file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Unsupported print media</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>JobsPage</name> <name>JobsPage</name>
@ -247,6 +259,10 @@
<source>Resolution</source> <source>Resolution</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>Print media</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>utils</name> <name>utils</name>

View file

@ -128,6 +128,14 @@
<source>Failed to load image</source> <source>Failed to load image</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Unsupported PDF paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
@ -189,6 +197,10 @@
<source>Failed to open file</source> <source>Failed to open file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Unsupported print media</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>JobsPage</name> <name>JobsPage</name>
@ -247,6 +259,10 @@
<source>Resolution</source> <source>Resolution</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Print media</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>utils</name> <name>utils</name>