Fixed an issue where filenames containing dots (e.g., Chilean RUT format) caused incorrect handling of the .pdf extension.
Previously, the system misinterpreted dots within the filename as extension separators, resulting in invalid or corrupted PDF downloads.
Filenames with dots are now handled correctly, ensuring documents are generated and downloaded as valid .pdf files.