Can't see signature on alfresco share preview
Dnhatsave opened this issue · 7 comments
Hi everyone,
I like to preview signatures on alfresco share
I follow the instruction and i've coment a part off code
if (this.data.fieldType === 'Sig') {
warn('unimplemented annotation type: Widget signature');
return false;
}
of the file components/preview/pdfjs/pdf.worker.js on alfresco share but it dont work.
i like to know how i can achieve the this feature on sinadura?
Thanks.
Don't forget to change pdf.worker-min.js too, and restart Alfresco service.
Kind regards.
--C.
Thanks for rapid response @CesarCapillas ,
I don't find the minimal version of the pdf.worker.js
i should change pdf.worker.js for pdf.worker-min.js ??
Hi:
pdf.worker-min.js is located at the same folder that pdf.worker.js in
/tomcat/webapps/share/components/preview/pdfjs/
It is a minified version of the original javascript, you can copy the changed pdf.worker.js to pdf.worker-min.js first to check everything is working, and later you can minify it with some js tool.
Hope it helps.
--C.
Hi cersar,
Im confused, you documentation says
`Configuring Share previews for PDF signatures
In Share AMP, you must extend:
components/preview/pdfjs/pdf.worker.js
commenting this part.
if (this.data.fieldType === 'Sig') {
warn('unimplemented annotation type: Widget signature');
return false;
}
`
by default the file pdf.worker.js.old is commented at this line .
what is necessary to preview the signatures?
I've convert the pdf.worker.js to a minified js as you recomend and l've commented the both files
the pdf.worker.js and pdf.worker-min.js on my share amp file.
when i remove this comments the document preview show a infinity loading.
Hi:
pdf.worker.js.old is just an old reference because it depends on Alfresco Share version.
You must use the pdf.worker.js version for your case and the pdf.worker-min.js minified one, with the corresponding lines commented.
If you find a infinity loading, either you are not using the correct pdf.worker.js version or you minified incorrectly. Surely the minification is the problem, so just copy your commented pdf.worker.js in pdf.worker-min.js preserving both, and deploy for testing. Alfresco Share component is using the minified version.
Be sure too, that maven is not cleaning min files when packaging.
Regards.
--C.
Hi cesar,
Now its working :-D, thank you very much for you attention.
I recommend to clarify the Read Me, i thought the pdf.worker.js file was an amp dependency but now i'm sure that is alfresco share dependency.
Hugs.
There is no code :
if (this.data.fieldType === 'Sig') {
warn('unimplemented annotation type: Widget signature');
return false;
}
in Alfresco 6.2. Is there something else I need to do in Alfresco 6.2 to see it in the preview?
PS: I can see the sign if it on the first page in the thumbnail.