Send PDF from server to client

jeez. Is there nothing like Express static files middleware for Meteor/Iron Router? This is a good example of why I wish Meteor just provided some middleware I could plug into express or another general-purpose server-side routing framework. Then again, I guess ultimately I could run a separate Express server that proxies to the Meteor server…

Good idea! What I wound up doing worked, but was a lot more trouble than it should have been.

I found a much better example of how to do this in this Stack Overflow answer (though I should note that its usage of connect is very outdated, as connect.static has been moved to the serve-static package.

I’m using a pdf filler with the PDFtk server installed on the published server, but keep getting a “Error: spawn pdftk ENOENT” error, any clues as to why this is happening? I’ve made sure I’m getting the correct path, and it works just fine on a local machine.

I have a server-side route and I’m using pdfmake. When user visit the route, the PDF is generated.