Free Support Forum - groupdocs.com

Export Annotations not working with CustomInputDataHandler


#1
Hi,

I am using the 2.0 version of the annotation lib for java. I copied all servlets from the sample and also added a custom InputDataHandler as written here (http://www.groupdocs.com/docs/display/annotationjava/GroupDocs.Annotation+for+Java+-+Custom+Input+DataSource) Viewing and adding annotations to the document works fine, but when I want to export the Document as PDF with comments. I get following error

Handler throws exception: File with guid '6' is not found in CustomInputDataHandler#fileMap

I debugged the CustomInputDataHandler the method getFileDescriptionList seems only to get called once and so the filemap is not updated when a temporary export file is created. I tried to manually refresh the map before calling the getFileHandler method in the GetFileServlet, this also does not help as the the guid generated via new EncodedPath(file.getName(), serviceConfiguration).getPath() gives another result then 6.

What can I do to get the Export working using the CustomInputDataHandler?

Regards,
Martin


#2
Hello,

Thank you for your inquiry ,

Unfortunately, we can't reproduce the issue with our Servlet example. We have configured it to use the CustomInputDataHandler and for us the ExportAnnotationsServlet works well and we can export document via export button.

So if you made any changes with these files, then please share the changes with us.

We will wait for your details.

--------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+


#3
Hi,

I had the error with the integrated Code, now I tried to modify the sample to use the CustomDataInputHandler and I am able to reproduce the issue. When I click the export button nothing happens (no download dialog shown). I only modified the AnnotationServlet to call the AnnotationHandler constructor with a 3rd argument. I am using the 2.0 version of the annotation lib.

Regards,
Martin


#4
Hello,

We have managed to reproduce the issue on our side and found a reason of the issue. The problem is that the ExportAnnotationsHandler creates a temp file that should be downloaded with another guid, so we modified the CustomInputDataHandler class and attached it to this thread. Please recheck the problem with changed code .

We will wait for your results.

-----------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+


#5

Hi,


Thank you for the fix, export is working properly now. Do you know when the new version of the annoation lib will be released? Does it make sence to wait until the the new version is released to integrate the library in our code or will the migration from the 2.0 version to the new version will not cost much effort?

Regards,
Martin

#6
Hello Martin,

Unfortunately , we can't share any exact date of the release of our library, but by preliminary estimates the library will be released on September. If you can't wait then you can integrate our legacy library and we will help you with the migration when the new generation of the library will be released.

If you will have more questions please feel free to contact us.

-----------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+