cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with document previewer for documents with long file names (Alfresco running on Windows)

aabd
Champ on-the-rise
Champ on-the-rise
Hi,

We're currently running Alfresco Community 5.0d on Windows Server 2008 R2. When a user clicks on a Word document in Alfresco, the document previewer does not work. It displays the error "Cannot load PDF content". Everything else works, including downloading the document and editing it.

We've narrowed the cause of the problem down to documents with long names. For example, when we try to preview the document with a short name (name: "Test Document.docx"), the previewer works. But when we try to preview a document with a long name (name: "This is a very very very very very very very very very very very very very very very very very very long name.docx") the previewer fails. Please refer to the attached logfile, containing the errors.

On the Windows server, we've spotted a very long path to the generated pdf file from the previewer (for example: "D:\ALFRES~3\tomcat\temp\Alfresco\THISIS~1.DOC\This is a very very very very very very very very very very very very very very very very very very long name.docx-OpenOfficeContentTransformer-target-4579919968688505989.pdf"). This pdf file is 0kb in size, which is incorrect.

We believe that the pdf document can't be generated successfully, because of the MAX_PATH length value in Windows (which has a static value of 260).

Does anybody have a solution for this problem, except for migrating to Linux which is not an option for this customer?
6 REPLIES 6

eswbitto
Confirmed Champ
Confirmed Champ
Yeah……Shorten the name of the file.

aabd
Champ on-the-rise
Champ on-the-rise
Shortening the filename could be a solution indeed 🙂
However, the customer would like to keep using long file names, because of document naming conventions which are enforced by business policies.

tearalong
Champ in-the-making
Champ in-the-making
"We believe that the pdf document can't be generated successfully, because of the MAX_PATH length value in Windows (which has a static value of 260)"
I think this is definitely the cause.
Can you shorten the path by renaming folders, changing the temp file location, or even mapping it to a drive letter?

Is the root cause of this that the 256 character limit in URL?

aabd
Champ on-the-rise
Champ on-the-rise
Unfortunately we can't shorten the path ourselves, because Alfresco generates those temporary (sub)folders and tempfiles on its own. The only thing we can change is the base path, which is D:\Alfresco50d in our case.

We've created an issue in Alfresco's JIRA bugtracking system, please refer to https://issues.alfresco.com/jira/browse/ALF-21340 .

piercerob
Champ in-the-making
Champ in-the-making

Easy solution is Long Path Tool.