We have a scenario where we need to use the Quickbooks SDK to create invoices from an external application and then return a PDF copy of that invoice to the calling application.
Creating an invoice is very easy to do with the Quickbooks SDK, so there is no problem with this first step.
However, I am unsure how to actually print or return the invoice (as a PDF) through the external calling application.
Here are a few questions I have relating to this objective.
- Does the Quickbooks SDK provide the capability to directly request and return a visual representation (e.g. a PDF) of a document (e.g. an invoice)?
- Does the Quickbooks SDK provide the capability to directly print a document (e.g. an invoice)?
Most of these questions come from my general lack of familiarity with the Quickbooks SDK.
Assuming that number 1 above is not possible, some possible alternate strategies for accomplishing our objective are as follows.
Strategy A - Print and Export to PDF Using Predetermined Filename
If supported, we would request Quickbooks to print an invoice to a PDF with a name of our choosing. Using a Filewatcher, we would monitor the directory and retrieve the printed invoice programmatically.
Strategy B - Create Own Invoice Report Outside of Quickbooks
We know that we can receive all the data for the invoice back via the Quickbooks SDK. We could generate our own invoice report and print it completely outside of Quickbooks. This is a lot of work and we would prefer to avoid this if possible.
I very much welcome any comments on these strategies. Better yet, a workable solution would be great.
FYI, Our technology Stack uses C#/ASP.NET, QBFC, Web Connector, and Quickbooks 2010.
Thank you in advance!
The answers to your questions are...:
No, it doesn't.
No, it doesn't.
Your Strategy B is the correct strategy. Grab the invoice data via the SDK, and use that to create your own invoices.
whenever u create any invoice in quickbook using SDK, in response u will get invoice data
find below code to save invoice value in datatable
u can convert that datatable to pdf or any format