Page 1 of 1

TiffAddToMultiPageFile returns GenericError

Posted: Tue Mar 12, 2019 5:03 pm
by sandor
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

Re: TiffAddToMultiPageFile returns GenericError

Posted: Tue Mar 12, 2019 6:46 pm
by sandor
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.

Re: TiffAddToMultiPageFile returns GenericError

Posted: Wed Mar 13, 2019 10:03 am
by Gabriela
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.

Re: TiffAddToMultiPageFile returns GenericError

Posted: Wed Mar 13, 2019 11:50 am
by sandor
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

Re: TiffAddToMultiPageFile returns GenericError

Posted: Wed Mar 13, 2019 12:51 pm
by Gabriela
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.

Re: TiffAddToMultiPageFile returns GenericError

Posted: Thu Mar 14, 2019 11:40 am
by sandor
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

Re: TiffAddToMultiPageFile returns GenericError

Posted: Thu Mar 14, 2019 8:01 pm
by Gabriela
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.

Re: TiffAddToMultiPageFile returns GenericError

Posted: Fri Apr 12, 2019 11:22 am
by sandor
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

Re: TiffAddToMultiPageFile returns GenericError

Posted: Mon Apr 15, 2019 9:56 am
by Gabriela
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.

Re: TiffAddToMultiPageFile returns GenericError

Posted: Mon May 06, 2019 7:48 am
by Gabriela
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.

Re: TiffAddToMultiPageFile returns GenericError

Posted: Mon May 06, 2019 1:06 pm
by sandor
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?

Re: TiffAddToMultiPageFile returns GenericError

Posted: Mon May 06, 2019 1:18 pm
by Gabriela
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.

Re: TiffAddToMultiPageFile returns GenericError

Posted: Mon May 06, 2019 1:46 pm
by sandor
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.