{"id":12564,"date":"2017-10-13T22:52:38","date_gmt":"2017-10-14T05:52:38","guid":{"rendered":"https:\/\/ephesoft.com\/docs\/?p=12564"},"modified":"2020-11-03T17:13:54","modified_gmt":"2020-11-04T00:13:54","slug":"kb0019203-folder-import-error-when-file-has-a-long-name","status":"publish","type":"post","link":"https:\/\/ephesoft.com\/docs\/kb0019203-folder-import-error-when-file-has-a-long-name\/","title":{"rendered":"KB0019203 \u2013 Folder import error when file has a long name"},"content":{"rendered":"
Applies to: <\/strong>Ephesoft Transact 4.x and above<\/p>\n Folder import fails for a PDF with an error like the following one:<\/p>\n Converted Tiff files count not equal to the the TIFF pages count. actualTiffFilesCount :: 0, expectedTifFilesCount :: 15 for batch instance ::BI9<\/p>\n 2017-10-12 10:56:39,418 [ERROR] [pool-1-thread-3] [com.ephesoft.dcma.imp.FolderImporter] – Converted Tiff files count not equal to the the TIFF pages count. actualTiffFilesCount :: 0, expectedTifFilesCount :: 15 for batch instance ::BI9<\/p>\n 2017-10-12 10:56:39,422 [ERROR] [pool-1-thread-3] [com.ephesoft.dcma.imp.service.ImportServiceImpl] – Converted Tiff files count not equal to the the TIFF pages count.<\/p>\n com.ephesoft.dcma.core.exception.DCMAApplicationException: Converted Tiff files count not equal to the the TIFF pages count.<\/p><\/blockquote>\n Windows has a limit on path length equal to 260 characters. When a file name is very long, the path during file import is even longer since various directories are created with the name of the original file. This happens when Ephesoft calls Ghostscript to convert the PDF file to multiple single page TIFFs.<\/p>\n Files with a name of around 50 characters are likely to experience this error, especially on versions previous to 4.1x<\/strong><\/p>\n This error is extremely unlikely to happen on Linux as the maximum allowed path is 4094 characters.<\/p>\n Change the name of the file to something shorter.<\/p>\n Net permissible file path length = 227 characters .<\/p>\n File path + file name should be 227 characters max.<\/p>\n If the total length exceeds 227, then you will see issues.<\/p>\n Below is the formula.<\/p>\n So net permissible file path length = 259 – 22 – 10 = 227<\/p>\n The calculation above is provided for Windows, Linux OS has different calculations.<\/p>\n","protected":false},"excerpt":{"rendered":" Applies to: Ephesoft Transact 4.x and above Issue Folder import fails for a PDF with an error like the following […]<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12392,12377],"tags":[1430],"yoast_head":"\nIssue<\/strong><\/h2>\n
Root Cause<\/strong><\/h2>\n
Solution<\/strong><\/h2>\n
int permissibleLength = PERMISSIBLE_LIMIT_PATH_LENGTH_WINDOWS - PDF_PROCESSING_FOLDER.length() - 10;\r\nPERMISSIBLE_LIMIT_PATH_LENGTH_WINDOWS = 259\r\nPDF_PROCESSING_FOLDER.length() = 22<\/pre>\n