We have been using parts of your code, and recently we faced the above error.
When the document name in Alfresco was very large (e.g. >255 chars) we were getting AlfrescoRuntimeException :
org.alfresco.error.AlfrescoRuntimeException .. ... "File name too long"
We have been using parts of your code, and recently we faced the above error.
When the document name in Alfresco was very large (e.g. >255 chars) we were getting AlfrescoRuntimeException : org.alfresco.error.AlfrescoRuntimeException .. ... "File name too long"
A fix that worked for us, was to use the nodeRef id also in the name of the temp document at: https://github.com/ntmcminn/alfresco-pdf-toolkit/blob/6b4a14bb22652fdd07b7b05efb121102a2ed9b84/pdf-toolkit-repo/src/main/java/org/alfresco/extension/pdftoolkit/service/PDFToolkitServiceImpl.java#L1448
e.g.
File file = new File(toolkitTempDir, nodeRef.getId());