Hello,
I am following the alfresco developer series by jeff potts and building custom actions. My requirement is to create custom actions such that they trigger when I upload a pdf and scan the document to perform actions like water marking, OCR, classification, content extraction etc.
I see there is a plugin which does some of the things that I need called pdf-toolkit but it seems to be not working as expected with the latest version of alfresco. Hence I've started creating the custom actions on my own.
I am using pdfbox 2.0.8 to work with pdf's and was able to successfully convert searchable/non searchable pdfs to text using it directly in java. I have added this version of pdfbox as the dependency to my alfresco project.
Issue: Since alfresco automatically pulls in pdfbox 1.8.10, my version of pdfbox was not used and hence I am coming across the following issue.
Caused by: java.lang.NoSuchMethodError: org.apache.pdfbox.pdmodel.PDDocument.getPage(I)Lorg/apache/pdfbox/pdmodel/PDPage;
What options do I have ? What do you suggest ?
You cannot / should not build any customisations / extensions of Alfresco that require / bundle different library versions than what is shipped with Alfresco. Such conflicts arise from classloading issues where parts / all of the code may be loaded from a library that is incompatible to what Alfresco is expecting in some place, or to what your extension may expect. The load order (which version "wins") is somewhat non-deterministic as it depends on both the JVM, application server classloader and the operating / file system.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.