TiffAddToMultiPageFile returns GenericError

Discussions about image processing and document imaging.
Post Reply
sandor
Posts: 8
Joined: Tue Mar 12, 2019 4:33 pm

TiffAddToMultiPageFile returns GenericError

Post by sandor » Tue Mar 12, 2019 5:03 pm

Hi,

I'm using GDPicture for scanning images and saving them in PDF.
When using TiffAddToMultiPageFile in iteration at the 46th call I get a GenericError and in the resulted PDF this page will be black or faulty as seen in the attachments.

There are two ways of reproducing this error: Iteration with 50 pictures at 600 dpi or an iteration with 200-300 pictures at 200dpi. In the last case the error will appear much later.. around 90%.
The error is present in the 14.1.0.8 version too.

I'm looking forward for your help
Best regards:
Sandor
Attachments
GDPicture version 14.1.png
GDPicture version 14.1.png (8.91 KiB) Viewed 399 times
GDPicture version 14.0.png
GDPicture version 14.0.png (1.27 KiB) Viewed 399 times
Last edited by sandor on Wed Mar 13, 2019 11:51 am, edited 1 time in total.

sandor
Posts: 8
Joined: Tue Mar 12, 2019 4:33 pm

Re: TiffAddToMultiPageFile returns GenericError

Post by sandor » Tue Mar 12, 2019 6:46 pm

The sourcecode:

Code: Select all

            SetActualImage(0);
            int mpt = imaging.CreateClonedGdPictureImage(actualImage.handle);
            GdPictureStatus gdst = imaging.TiffSaveAsMultiPageFile(mpt, filename, TiffCompression.TiffCompressionNONE);

            for (int i = 1; i < imagesInTifFiles.Count; i++)
            {
                SetActualImage(i);
                gdst = imaging.TiffAddToMultiPageFile(mpt, actualImage.handle);
                if (gdst != GdPictureStatus.OK)
                {
                    //Error shows here: "GenericError"
                    logger.Error(String.Format("TiffAddToMultiPageFile status: {0}", gdst.ToString()));
                }
            }

            imaging.TiffCloseMultiPageFile(mpt);
            imaging.ReleaseGdPictureImage(mpt);
Changing TiffCompression in TiffSaveAsMultiPageFile to TiffCompressionAUTO seems to resolve the problem, but I don't think that's a good solution.

Gabriela
Posts: 423
Joined: Wed Nov 22, 2017 9:52 am

Re: TiffAddToMultiPageFile returns GenericError

Post by Gabriela » Wed Mar 13, 2019 10:03 am

Hello,

To be able to replicate the issue exactly as you do we need the complete and compilable code snippet and the source document.
Could you share those materials? Is it document related?
Or you can also create a ticket on our support forum https://support.gdpicture.com with all those materials if they are sensitive to share.
Please be sure we can run your code "as is" and it should demonstrate the issue.
Thank you for understanding.
Kind regards,

Gabriela
GdPicture Team

sandor
Posts: 8
Joined: Tue Mar 12, 2019 4:33 pm

Re: TiffAddToMultiPageFile returns GenericError

Post by sandor » Wed Mar 13, 2019 11:50 am

Dear Gabriela,

I've modified one of your demo applications and put it here:
https://drive.google.com/file/d/1P1R44w ... sp=sharing
The sample image is there too. You have to select the sample.tif and a destination folder in the application and hit Start to reproduce the error.
Looking forward for your help.
Sandor

Gabriela
Posts: 423
Joined: Wed Nov 22, 2017 9:52 am

Re: TiffAddToMultiPageFile returns GenericError

Post by Gabriela » Wed Mar 13, 2019 12:51 pm

Hi,

I can definitively confirm, that we have reproduced the issue and it has been transmitted to the development team for further analysis. I will keep you informed about any potential progress here.
Kind regards,

Gabriela
GdPicture Team

sandor
Posts: 8
Joined: Tue Mar 12, 2019 4:33 pm

Re: TiffAddToMultiPageFile returns GenericError

Post by sandor » Thu Mar 14, 2019 11:40 am

It is good to hear that!
Could you please let us know usually how long does it take to fix an issue like this?
Thanks

Gabriela
Posts: 423
Joined: Wed Nov 22, 2017 9:52 am

Re: TiffAddToMultiPageFile returns GenericError

Post by Gabriela » Thu Mar 14, 2019 8:01 pm

Hi,

I cannot give you any time frame now, the issue is reported, but it has not been analysed still. I will update you immediately when there will be any potential progress. Thank you for your patience.
Kind regards,

Gabriela
GdPicture Team

sandor
Posts: 8
Joined: Tue Mar 12, 2019 4:33 pm

Re: TiffAddToMultiPageFile returns GenericError

Post by sandor » Fri Apr 12, 2019 11:22 am

Dear Gabriela,

Do you have any news about the progress? Our corporate client with hundreds of users is waiting for this bugfix. Is there any way to speed up the process?

Kind regards,
Sandor

Gabriela
Posts: 423
Joined: Wed Nov 22, 2017 9:52 am

Re: TiffAddToMultiPageFile returns GenericError

Post by Gabriela » Mon Apr 15, 2019 9:56 am

Hello,

I'm sorry, but there is no way to speed up the process. I have increased the priority and I have left a note on your request, the only way is to wait. I do not have any further details, so I cannot say you more. It looks like there are other priorities to solve. The issue is reported and if any details will come, I will update you immediately. Thank you for your patience.
Kind regards,

Gabriela
GdPicture Team

Gabriela
Posts: 423
Joined: Wed Nov 22, 2017 9:52 am

Re: TiffAddToMultiPageFile returns GenericError

Post by Gabriela » Mon May 06, 2019 7:48 am

Hi,

Finally, I have more details from the dev-team.
You are trying to create more than 4 GB TIFF file. The specification defines a limit of 4GB. To generate a bigger file the BigTIFF format must be used. We do not support creating/writing for such files, we only support reading right now. I have reported this request, so the feature is on our roadmap now (currently without any priority and time frame). But you need to be aware, that such file will not be readable by all software since they will need to support the BigTIFF specification.
Let us know if you have further questions.
Kind regards,

Gabriela
GdPicture Team

sandor
Posts: 8
Joined: Tue Mar 12, 2019 4:33 pm

Re: TiffAddToMultiPageFile returns GenericError

Post by sandor » Mon May 06, 2019 1:06 pm

Dear Gabriela,
Thanks for the updates.

The reading of the BigTIFF file format wouldn't be a problem, because as I mentioned in my first post I'm saving the TIFF to the drive only for creating PDF files. The TIFF file is only opened with GDPicture then deleted.
Is there a way to split the TIFF file into smaller (<4GB) files using TiffAddToMultiPageFile then combining these TIFF files to one PDF?

Gabriela
Posts: 423
Joined: Wed Nov 22, 2017 9:52 am

Re: TiffAddToMultiPageFile returns GenericError

Post by Gabriela » Mon May 06, 2019 1:18 pm

Hello,

Why do you need to create such a big tiff file firstly? If your resulting document should be PDF, you can save the scanned pages directly to a PDF document and then manipulate with those PDF documents (adding pages, inserting pages, merging etc.)?
Otherwise, it looks like you need to implement your own check when adding pages to the resulting tiff file to not create such big files. There is no split functionality for multipage tiff files right now.
Let me know your further questions.
Kind regards,

Gabriela
GdPicture Team

sandor
Posts: 8
Joined: Tue Mar 12, 2019 4:33 pm

Re: TiffAddToMultiPageFile returns GenericError

Post by sandor » Mon May 06, 2019 1:46 pm

Our client scans couple hundred pages at once and this issue can be replicated with 200 DPI at 200-300 pages too. Keeping this amount of file in memory causes errors, saving to pdf then merging together 200 pages seems more time consuming, but I gonna give it a try.
If you have further suggestions please let me know.
Thanks for your help.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests