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

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2015 09:55 AM
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?
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?
Labels:
- Labels:
-
Archive
alfresco_84.log.zip
3 KB
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2015 12:03 PM
Yeah……Shorten the name of the file.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2015 07:35 AM
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.
However, the customer would like to keep using long file names, because of document naming conventions which are enforced by business policies.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2015 03:51 AM
"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?
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?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2015 06:00 PM
Is the root cause of this that the 256 character limit in URL?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2015 05:27 AM
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 .
We've created an issue in Alfresco's JIRA bugtracking system, please refer to https://issues.alfresco.com/jira/browse/ALF-21340 .
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2017 11:31 AM
Easy solution is Long Path Tool.
