Endpoint - Render Sales Invoices as pdf
Hi Folks
Well you have seen my posts on the emailing endpoint and its failures - major faults - I now have to fallback to option 'C' - this endpoint.
What it does is takes an item invoice and using either a default form or named designed form - renders this to aa pdf and bitstreams it to you via an http call - I get that working and I get a binary stream of data that appears to be a pdf format - but at this point it all goes to doo doo.
It is a bitstream so saving as text will error - so I save it to file named myob.pdf and though it appears to have some formatting that is pdf and its header says %pdf.... it doesn't open and errors.
I have saved the actual invoice in myob as a pdf and opened it as a text to compare and it isn't the same - so let us 'assume' it is coming to me correctly as a formatted pdf in a binary filestream what am I doing wrong my end that is corrupting it.
I am using MS Access and saving it as a binary filestream but am not having success.
Anyone out there use this endpoint and it works - if necessary I can quickly spin up code in VB.Net or C#.Net to download invoices so I can attachment for external emailing - any urgent help would be appreciated - I just don't have time to muck with this possible solution - as my MS Access code posts the invoices to MYOB anyway so to build an invoice in MS Access which has a very powerful gui designer will be easy and then to save it to pdf is a breeze and email it - no problem using CDO code which goes around outlook.
The Doc