The ATL COM module generalInvoiceRequest is capable of
generating electronic and printed invoices & reminders
generating electronic and printed invoices & reminders
API browser of generalInvoiceRequest450 COM module
IGeneralInvoiceRequestManager::Print method | |||
---|---|---|---|
The Print method validates the defined invoice/reminder data and prints the request on the local printer. The printer selection is done via the used report generator template file. If the template file was not connected to a printer with the PrintSetup method then the default printer with its default settings is used.
The bstrPrintTemplate variable obeys a special syntax and can optionally be used to set special print commands like using electronic webstamps, producing PDFs or changing print objects dynamically.
IMPORTANT LICENSE NOTE The report engine used is Hexatech's ViewPro (www.hexatech.com). If you supply your own template files then you must have your own ViewPro license. By using this COM module you implicitly agree upon this restriction! |
|||
Restful webservice calling syntax | |||
[POST] | /baseURL/IGeneralInvoiceRequestManager/Print | ||
[JSON input data] | pIGeneralInvoiceRequestManager: bstrPrintTemplate: lGenerationAttributes: ePrintPreview: eAddressRight: eSortTimeTariff: bstrSenderID: plTimestamp: |
longValue, //interface address "utf8StringValue", longValue, longValue, longValue, longValue, "utf8StringValue", longValue |
|
[JSON result data] | plTimestamp: pIGeneralInvoiceResult: pbstrPDFFile: pbStatus: |
longValue, longValue, "utf8StringValue", booleanValue |
|
[HTTP result status] | 200 | Return status 200 signals a successful method call | |
204 | Return status 204 (noContent) signals that the end of an iteration is reached | ||
>= 400 | Return status >= 400 signals an unsuccessful function call. The returned JSON{errorCode: code, errorText:"text"} supplies the error message the same as GetAbortInfo() would do. | ||
C/C++ calling syntax | |||
HRESULT Print( | BSTR
long YesNoType YesNoType YesNoType BSTR long IGeneralInvoiceResult VARIANT_BOOL |
bstrPrintTemplate,
lGenerationAttributes, ePrintPreview, eAddressRight, eSortTimeTariff, bstrSenderID, *plTimestamp, **pIGeneralInvoiceResult, *pbStatus); |
|
[C/C++ return value] | S_OK | This value is returned if the function call was successful. | |
S_FALSE | This value is returned if the end of an iteration is reached | ||
E_name | This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions. | ||
Calling argument description | |||
[in] BSTR | bstrPrintTemplate | The bstrPrintTemplate variable is used to explicitly change print template reports and/or print objects as defined in "Syntax of the printTemplate variable".
If bstrPrintTemplate is empty then the default print template of the defined data language ( IGeneralInvoiceRequest:: Initialize method) is used. |
|
[in] long | lGenerationAttributes | This variable overrules the default behavior of the print process.
lGenerationAttributes is a 32-bit integer where the possible "commands" are values from the generationAttributes data type ORed together to form the overall command. Besides the manipulation of the printed ESR parameters the downgrade to version V440 can be enforced here! |
|
[in] YesNoType | ePrintPreview | A Boolean that defines if print preview is used (enYes) or printing is done (enNo)
In Restful Webservice system: ePrintPreview is automatically set to enNo no matter what the input value is. Furthermore, printing is automatically redirected to a PDF output file since there are no printers available. |
|
[in] YesNoType | eAddressRight | A Boolean that defines on which side -left or right- the receiver address should be printed.
Note that left-sided addressing is only allowed for the summary invoice/reminder forms. The parameter is silently ignored for the detailed invoice/reminder forms. |
|
[in] YesNoType | eSortTimeTariff | A Boolean that defines how the services are sorted:
|
|
[in] BSTR | bstrSenderID | Short sender address identification or empty.
If set then the sender identification is printed atop of the receiver address as an alternative to the sender address on the envelop. |
|
[in,out] long | *plTimestamp | The timestamp of the XML document as epoch time (seconds elapsed since 1.1.1970) that is used as timestamp of the topmost object reference from that point on.
If the timestamp for the topmost object reference was already set (e.g. to produce a copy) then this same timestamp is returned. |
|
[out] IGeneralInvoiceResult | **pIGeneralInvoiceResult | The IGeneralInvoiceResult interface handle that allows to get all loaded data back.
The handle is NULL if an error occurred. |
|
[out] BSTR | *pbstrPDFFile | In Restful webservice output: pbstrPDFFile is a relative URL to a PDF file holding the result of the Print method. Therefore, after receiving the JSON result data do GET pbstrPDFile such as to have the produced printout. |
|
[out,retval] VARIANT_BOOL | *pbStatus | Return status of the method. If pbStatus is VARIANT_FALSE then an error occurred and GetAbortInfo should be called to retrieve the error string. | |