Let me share some details about the error when attaching a PDF file to an invoice.
Some of the QBO users are also having issues with uploading PDF files to invoices and sales receipts. Our engineers are currently working on finding the cause, so they can implement a fix.
As a workaround, try removing the extra space between the file and the extension. The file name should look like this "filename.pdf". Then add the attachment once more.
While the investigation is ongoing, I'd suggest contacting our phone support team so we can add you to the list of affected users. This way, we can notify you via email about the status of the issue.
Thank you for your patience while we're working to resolve this. Please feel free to let me know if you have other questions about QuickBooks Online. Have a good one.