I am using CDIntfEx to print documents and setting FileNameOptions with (NoPrompt + EmbedFonts + BroadcastMessages + MultilingualSupport + UniqFileName) before calling EnablePrinter on it. The problem I am running into is if the filename is very long (such as 240+ characters), the pdf is never written. The EndDocPost event is raised, but the file (GetGeneratedFileName) does not exist (presumably Windows can't write the file). I've tried specifying UseFileName along setting the DefaultFileName, but this also affects all the documents that wouldn't need their name changed. I tried setting it during the StartDocPre event, but it won't fire when the file's too long. I've tried setting it during the StartDocPost, but at that point, it's too late.
Since you guys have the DefaultDirectory, is it possible to truncate the filename such that it isn't too long to fit in windows? Is there anything else we can try?
Long filename
Re: Long filename
Hello,
I believe this is a windows limitation.
In the Windows API the maximum length for a path is MAX_PATH, which is defined as 260 characters.
https://msdn.microsoft.com/en-us/librar ... px#maxpath
Thanks
I believe this is a windows limitation.
In the Windows API the maximum length for a path is MAX_PATH, which is defined as 260 characters.
https://msdn.microsoft.com/en-us/librar ... px#maxpath
Thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite