Attachment.DownloadFile removes spaces from filepath

I use the Attachment.DownloadFile method to set the base64Src in the PDF viewer. like in this example:

I think this works but I’m getting this error:

Schermafbeelding 2024-12-11 134252

The Vantage PDF folder contains 3 spaces in front but Epicor removes 2 of them.

Does someone know a way to work around this? I cannot simply change the name of the folder because it has consequences for the customer.

1 Like

Like “Vantage___PDF” ? but _ is a space?

If _ is a space the correct path is “___Vantage_PDF”

Instead of that the method returns “_Vantage_PDF”

1 Like