Compare commits

...

3 Commits

Author SHA1 Message Date
yangjiaxuan 0d8c7d7f19 ofd开放压缩功能 2023-03-03 17:57:31 +08:00
yangjiaxuan beec6cadca pdf开放压缩功能 2023-03-03 14:22:56 +08:00
yangjiaxuan 156b8377ad 取消中晶ocr多语言识别,使用ocr汉王库 2023-03-03 12:00:14 +08:00
7 changed files with 19 additions and 19 deletions

View File

@ -165,7 +165,7 @@ void Dialog_AquireInto::on_cbox_format_currentIndexChanged(int index)
if (index < 6 || index >= 10 )
ui->cbtn_multiFile->setChecked(false);
ui->btn_option->setEnabled(0 == index || 6 == index);
ui->btn_option->setEnabled(0 == index || 6 == index || 7 == index || 8 == index);
}
void Dialog_AquireInto::on_lineEdit_directory_textChanged(const QString& arg1)

View File

@ -63,13 +63,13 @@ Dialog_Export::Dialog_Export(int total, const std::vector<int> &selectedIndexs,
m_supportType.push_back(SupportType(".pgm", "PGM - Portable GreyMap", FILE_TYPE_ATTR_NO_MORE_OPTION));
m_supportType.push_back(SupportType(".pbm", "PBM - Portable BitMap", FILE_TYPE_ATTR_NO_MORE_OPTION));
m_supportType.push_back(SupportType(".tif", "TIF - TIFF Revision 6", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES | FILE_TYPE_ATTR_MORE_OPTIONS));
m_supportType.push_back(SupportType(".pdf", "PDF - Portable Document Format", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
m_supportType.push_back(SupportType(".ofd", "OFD - Open Fixed-layout Document", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
m_supportType.push_back(SupportType(".pdf", "PDF - Portable Document Format", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES | FILE_TYPE_ATTR_MORE_OPTIONS));
m_supportType.push_back(SupportType(".ofd", "OFD - Open Fixed-layout Document", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES | FILE_TYPE_ATTR_MORE_OPTIONS));
m_supportType.push_back(SupportType(".gif", "GIF - Graphics Interchange Format", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
if (!getOcrPath().empty())
m_supportType.push_back(SupportType(".pdf", "OCR->PDF - Portable Document Format", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
#elif (defined (OEM_HUAGAO) || defined (OEM_HANWANG) || defined (OEM_CANGTIAN) || defined (OEM_LISICHENG)) && !defined(x86_64)
#elif !defined (x86_64) && !defined (loongarch64)
m_supportType.push_back(SupportType(".pdf", "OCR->PDF - Portable Document Format", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
m_supportType.push_back(SupportType(".ofd", "OCR->OFD - Open Fixed-layout Document", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
m_supportType.push_back(SupportType(".rtf", "OCR->RTF - Rich Text Format", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
@ -148,7 +148,7 @@ Dialog_Export::Dialog_Export(int total, const std::vector<int> &selectedIndexs,
ui->label_ocrType->setVisible(false);
ui->comboBox_ocrType->setVisible(false);
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
if (!getOcrPath().empty())
{
ui->label_ocrType->setVisible(isOcr());
@ -293,7 +293,7 @@ void Dialog_Export::on_dialog_accepted()
saveCfgValue("export", "exportType", exportType);
saveCfgValue("export", "saveAsMulti", ui->check_saveAsMulti->isChecked());
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
int ocrLanguage = ui->comboBox_ocrType->currentIndex();
saveCfgValue("export", "ocrLanguage", ocrLanguage);
#endif
@ -307,7 +307,7 @@ void Dialog_Export::on_filterSelected(const QString& filterName)
m_suffix = ui->fileDialog->nameFilters().indexOf(filterName);
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
ui->label_ocrType->setVisible(isOcr());
ui->comboBox_ocrType->setVisible(isOcr());
#endif

View File

@ -65,7 +65,7 @@ void HGAPI Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param)
if (p->m_isOcr)
{
#if defined(OEM_ZHONGJING)
#if 0
HGChar tmpFileName[256];
HGBase_GetTmpFileName("tif", tmpFileName, 256);

View File

@ -82,10 +82,10 @@ Dialog_SaveAs::Dialog_SaveAs(QWidget *parent) :
";;PDF - Portable Document Format(*.pdf)"
";;OFD - Open Fixed-layout Document(*.ofd)"
";;GIF - Graphics Interchange Format(*.gif)";
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
if (!getOcrPath().empty())
filter += ";;OCR->PDF - Portable Document Format(*.pdf)";
#elif (defined (OEM_HUAGAO) || defined (OEM_HANWANG) || defined (OEM_CANGTIAN) || defined (OEM_LISICHENG)) && !defined(x86_64)
#elif !defined (x86_64) && !defined (loongarch64)
filter += ";;OCR->PDF - Portable Document Format(*.pdf)";
filter += ";;OCR->OFD - Open Fixed-layout Document(*.ofd)";
filter += ";;OCR->RTF - Rich Text Format(*.rtf)";
@ -111,7 +111,7 @@ Dialog_SaveAs::Dialog_SaveAs(QWidget *parent) :
ui->label_ocrType->setVisible(false);
ui->comboBox_ocrType->setVisible(false);
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
if (!getOcrPath().empty())
{
ui->label_ocrType->setVisible(isOcr());
@ -244,7 +244,7 @@ void Dialog_SaveAs::on_dialog_accepted()
m_savePath = getStdFileName(path + "/" + name + extName);
}
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
int ocrLanguage = ui->comboBox_ocrType->currentIndex();
saveCfgValue("saveAs", "ocrLanguage", ocrLanguage);
#endif
@ -257,9 +257,9 @@ void Dialog_SaveAs::on_dialog_accepted()
void Dialog_SaveAs::on_filterSelected(const QString& filterName)
{
m_suffix = ui->fileDialog->nameFilters().indexOf(filterName);
ui->btn_option->setEnabled(0 == m_suffix || 6 == m_suffix);
ui->btn_option->setEnabled(0 == m_suffix || 6 == m_suffix || 7 == m_suffix || 8 == m_suffix);
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
ui->label_ocrType->setVisible(isOcr());
ui->comboBox_ocrType->setVisible(isOcr());
#endif

View File

@ -8,7 +8,7 @@ Dialog_WriteSettings::Dialog_WriteSettings(int suffix_type, QWidget *parent) :
{
ui->setupUi(this);
//set visible
bool jpg_enable = (suffix_type == 0);
bool jpg_enable = (suffix_type == 0 || suffix_type == 7 || suffix_type == 8);
bool tif_enable = (suffix_type == 6);
ui->lab_tif_bw->setVisible(tif_enable);
ui->cbox_tif_bw->setVisible(tif_enable);

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>493</width>
<height>355</height>
<width>454</width>
<height>178</height>
</rect>
</property>
<property name="windowTitle">

View File

@ -431,7 +431,7 @@ HGResult MainWindow::saveImage(HGImage image, const HGImgFmtSaveInfo* info, bool
HGResult ret = HGBASE_ERR_FAIL;
#if defined(OEM_ZHONGJING)
#if 0
HGChar tmpFileName[256];
HGBase_GetTmpFileName("bmp", tmpFileName, 256);
ret = HGImgFmt_SaveImage(image, 0, info, tmpFileName);