KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Windows 10 Print to PDF feature and using a comma in the file name
PRODUCT: 4D | VERSION: 16 | PLATFORM: Win
Published On: August 23, 2018

Windows 10 includes a new Print to PDF feature that can can be used to replace PDFCreator functionality with a native solution provided by the OS. This is a welcome change by most developers, however there are some differences between the two products and as such, limitations may exist in one that do not exist in the other.

One difference between these two products is that the Microsoft Print to PDF feature does not appear to allow the use of a comma in the file name or in the path to where the file is generated at while PDFCreator appears to allow it. When using the Print to PDF feature the file is generated as a 0 kb file.

This may seem trivial but it can be hard to troubleshoot if you are unaware of this behavior.

If it is a requirement to use a comma in the file name, and also a requirement to use the Microsoft Print to PDF feature, then this limitation can be worked around by printing to a temporary directory that does not include a comma while using a file name that also does not include a comma. Then move the file using MOVE DOCUMENT after it has been generated. In this way, the file can be renamed to include the comma and it can be placed in a folder that includes a comma.

See Also:
Commented by Tim Penner on August 29, 2018 at 5:28 PM
Hi Charles, you are correct; the typos have been corrected. Thank you bringing this up.
Commented by Charles Wirth on August 23, 2018 at 2:12 PM
I believe the term "command" is used incorrectly twice in this tech note... Seems like "comma" is the correct word. One difference between these two products is that the Microsoft Print to PDF feature does not appear to allow the use of a command in the file name... If it is a requirement to use a command in the file name...