So when I print a file named Document1.docx from Word, the PDF name should be Document1.pdf.
If I print the same file 3 times, the generated names should be Document1.pdf, Document1-001.pdf and Document1-002.pdf.
I have just printed the empty default Dokument1 file 3 times using Word's quick print function. The following file names were generated:
1.) Dokument1.pdf
2.) Dokument1ᓽᔎ.pdf
3.) Dokument1ᓽᔎ-001.pdf
Then I did the same with Excel. The german default name for new documents is "Mappe" (german for file or folder or something like that)
1.) Mappe1ȄЄ༄pp.pdf
2.) Mappe1ȄЄ༄.pdf
3.) Mappe1ȄЄ༄-001.pdf
I also get forbidden characters (including control codes like Chr(1)), which of course lead to an error message - OR cause printouts to be simply skipped and lost.
Here I got the file name Kontosalden1 (Datenbank 1)㕝5䴀ಡ@움鵎ǀ.pdf.
Kontosalden1 (Datenbank 1).pdf would have been correct.
In such situations 20++ files (sometimes 50++) are printed and each one can potentially generate an error message if the file name contains forbidden characters.
The problem always seems to occur when the file name is automatically assigned by the print software and passed to the driver.
If I open and print out a file that I have named myself, the problem has not yet occurred (but that can still come).
It is probably self-explanatory that I'm somewhat unhappy...
Any suggestions?
==== Update 30.08.2020 (22:33)
In the meantime I've done a little research and found the file titrules.js.
To me it looks like one could tweak the eliminateBadChars() function to solve the problem.
But to be honest, regular expressions are just Greek to me. And all I know about Javascript is that it exists.
Code: Select all
function eliminateBadChars(s)
{
// var r = /[\/\\<>:"\|\?\*]/g;
// return s.replace(r, "_");
return s;
}
I would be very grateful.