TFormer_SetOutputName

Printing and Output · String encodings

Definition

Windows: ANSI; Unix: UTF-8

ERRCODE TFormer_SetOutputName(HTFORM pInstance, LPCSTR pszOutputName);

Windows only: UTF-16

ERRCODE TFormer_SetOutputNameW(HTFORM pInstance, LPCWSTR pszOutputName);

Contract

Sets the name of the output file or the name of the spool-job (on Microsoft Windows printers).

  • File output: supply a filename with its extension or a full path, for example out.pdf. Relative paths use the application's working directory. Select the format separately with TFormer_SetPrinterType.

  • Windows printer output: optionally supply a print-job title such as Order-4711. This names the job in the print queue; it does not select a printer or create a file.

Alternatively, a file-output prefix in TFormer_SetPrinterName selects both the format and filename. See Printing and Export for precedence, filename patterns and document-name fallbacks.

Returns

ErrOk (0) in case of success, non-zero if an error occurred

Parameters

Parameter / typeDescription
pInstanceHTFORM


The TFORMer instance provided by a previous call to TFormer_Init

pszOutputNameLPCSTR / LPCWSTR


The output filename or the name of the spool-job (on Microsoft Windows printers).

Note

Set the output filename before TFormer_Print when generating a file. Passing NULL clears the stored output name; it does not select an output format or restore a previous filename. For Windows printer output, the spool-job name is optional.

See also

TFormer_Print

Search documentation

Search in
More scopes
Additional scopes

All contents