manisandro / gImageReader

A Gtk/Qt front-end to tesseract-ocr.
GNU General Public License v3.0
1.63k stars 190 forks source link

Choose PDF version #201

Closed zamazan4ik closed 6 years ago

zamazan4ik commented 7 years ago

Hello,

I think you know that PDF standard has a lot of versions: 1.3,1.4,1.5, etc. Also there are A-type (Archive).

Is it possible to add this functionality? Abbyy FineReader has this. It will be useful for people, who has some software which cannot read very modern PDF documents.

manisandro commented 7 years ago

Should be fairly easy, you can specify the version when creating the document here https://github.com/manisandro/gImageReader/blob/master/qt/src/OutputEditorHOCR.cc#L1143

The PdfStreamedDocument constructor signature is

PdfStreamedDocument( PdfOutputDevice* pDevice, EPdfVersion eVersion = ePdfVersion_Default, PdfEncrypt* pEncrypt = NULL, EPdfWriteMode eWriteMode = ePdfWriteMode_Default );

and EPdfVersion is

enum EPdfVersion {
    ePdfVersion_1_0 = 0,       /**< PDF 1.0 */
    ePdfVersion_1_1,           /**< PDF 1.1 */
    ePdfVersion_1_2,           /**< PDF 1.2 */  
    ePdfVersion_1_3,           /**< PDF 1.3 */ 
    ePdfVersion_1_4,           /**< PDF 1.4 */
    ePdfVersion_1_5,           /**< PDF 1.5 */
    ePdfVersion_1_6,           /**< PDF 1.6 */ 
    ePdfVersion_1_7            /**< PDF 1.7 */ 
};
zamazan4ik commented 7 years ago

Can I start work on it?

manisandro commented 7 years ago

Sure!

zamazan4ik commented 7 years ago

Nice. I will create some pull requests. And you will be able to see progress on every task.

manisandro commented 7 years ago

Looking forward to it! I was actually hoping to be able to do some work myself again, but I keep getting sidetracked with other stuff...

zamazan4ik commented 7 years ago

Don't worry - i think we have enough work in gImageReader for me and for you :-)

manisandro commented 6 years ago

Done for Qt.

manisandro commented 6 years ago

Done also for Gtk