Skip to main content

2-2 Print

Execute a print job

This API executes a print job.

Example 1. Endpoint URI
https://api.svfcloud.com/v1/artifacts


Example 2. HTTP method

POST



Example 3. Content-type header for the HTTP request

multipart/form-data



Example 4. Parameters
  • Request body

    Request body data

    Value

    Required

    Description

    name

    Artifact name

    Specify the artifact name to create. The artifact name is displayed in the "Activity History" in SVF Cloud Manager.

    The following characters cannot be used in artifact names: 

    • / (slash) (0x2F)

    • \0 (0x00)

    If this parameter is omitted, "name" in "data/{name}" will be used as the artifact name. If "data/{name}" is also omitted, the artifact name will be blank.

    printer

    Printer ID

    maru.png

    Specify the output printer.

    You can specify the following values.

    • Registered printer ID

      Outputs to the specified printer by Direct Print.

    • File format

      Downloads the file in the specified format. The formats that can be specified depend on the format of the form layout.

      • XML file

        • PDF

        • EMF

        • EMFPLUS

        • EXCEL *1

      • Excel file

        • EXCEL *1

      • Word file

        • WORD

    • null

      Retrieves a form image.

    source

    Data type

    maru.png

    Specify the input data type. Currently, CSV is the only value that can be specified.

    defaultForm

    Form file path

    Specify the path and file name of the form layout. If the form layout is an Excel file, also specify the sheet name ([<file_name>]<sheet_name>).

    You can check the path and file name on the Resource screen in SVF Cloud Manager.

    • XML file example

      form/Document/Quotation/Quotation.xml

    • Excel file example

      form/Document/Quotation/[Quotation.xlsx]Sheet1

    • Word file example

      form/Document/Quotation/Quotation.docx

    If you specify VrSetForm in a CSV file, you do not need to specify this parameter. The specification in the CSV file has the priority.2-2-1 CSV data format

    data/{name}

    CSV data

    maru.png

    The value specified in {name} will be used as the value of the "Title" PDF property. For details of the CSV data to be specified, see "2-2-1 CSV data format".

    mode

    Processing mode

    This parameter must be specified if you want to archive the output PDF file to the cloud version of invoiceAgent Documents (hereafter referred to as iA Documents).

    Specify "archive".

    preference

    Print settings

    If the print settings name is omitted or the specified print settings name does not exist, the default print settings name will be used. Configure print settings in SVF Cloud Manager.

    For details, see "SVF Cloud Administration Guide" for SVF Cloud Manager.

    timeout

    Timeout time (seconds)

    If this parameter is omitted (or a value less than or equal to zero is specified), only the acceptance of the process will occur.

    You can specify up to 900 seconds (15 minutes).

    resource/{path}

    Resource data

    Specify the path of image data used for printing in the "{path}" part.

    The following procedure is necessary to output images.

    target

    Output target

    This parameter must be specified if you want to archive the output PDF file to iA Documents.

    Specify "SPA_ARCHIVE".

    Reference

    "SPA" is the former name of invoiceAgent Documents.

    target/spaFolder

    Destination folder

    This parameter must be specified if you want to archive the output PDF file to iA Documents.

    Specify a folder on iA Documents where the output file should be saved (Example: /Users/local/User01/SC_linkage_receive).

    target/overwrite

    Overwrite option for existing file

    Specify this parameter if you want to archive the output PDF file to iA Documents.

    Specify the behavior when a document with the same name exists in the archive folder.

    • true (default)

      The existing file is overwritten and archived

    • false

      The existing file is renamed (added a sequential number) and archived

    password

    Password

    A dialog box asking for the password appears when you open the PDF file. You can control the restriction that either enables or disables browsing of the PDF file by specifying this function. You must specify a password using half-width characters of up to 32 bytes. Due to Adobe Acrobat/Adobe Reader specifications, you cannot use double-byte characters.

    Caution

    If you archive a password-protected PDF file to iA Documents, the protection will be automatically removed.

    Reference

    If you use this password together with a permissions password, be sure to specify different strings. If you specify the same string for the two passwords, the permissions password will not be set.

    pdfPermPass

    Permissions password

    Specify the password to use for modifying various security settings that can be set when you use Adobe Acrobat/Adobe Reader.

    This specification allows you to modify PDF security settings for protection. You must specify a password using half-width characters of up to 32 bytes. Due to Adobe Acrobat/Adobe Reader specifications, you cannot use double-byte characters.

    Reference

    If you use this password together with a password for opening the PDF file, be sure to specify different strings. If you specify the same string for the two passwords, the permissions password will not be set.

    pdfPermPrint

    PDF print permission

    Manage the PDF print permission. The permissions password must be specified.

    You can specify the following values.

    • none (default)

      Does not allow printing.

    • low

      Allows low-resolution printing.

    • high

      Allows high-resolution printing.

    pdfPermModify

    PDF modify permission

    Manage the PDF modify permission. The permissions password must be specified.

    You can specify the following values.

    • none (default)

      Does not allow modification.

    • assembly

      Allows insertion, deletion, and rotation of pages.

    • fill

      Allows form fields to be filled in and signatures to be applied to existing signature fields.

    • annotation

      Allows comments to be added, form fields to be filled in, and signatures to be applied to existing signature fields.

    • all

      Allows any operation other than extracting pages to be executed.

    pdfPermCopy

    PDF copy permission

    Manage the PDF copy permission. The permissions password must be specified.

    You can specify the following values.

    • false (default)

      Does not allow copying.

    • true

      Enables the copying of text, images, and other content.

    Reference

    Regardless of this specification, text access will always be enabled for screen reader devices.

    redirect

    Redirection operation

    Specify whether or not to perform redirection if a downloadable value (e.g., PDF) is specified for the printer parameter.

    You can specify the following values.

    • false

      Does not perform redirection.

    • true

      Performs redirection.

    Reference

    • The default operation performs redirection.

    • If a cross-origin request (CORS) is made from a browser, automatic redirection will result in the process being blocked because no preflight has been performed. In this case, suppress the redirection explicitly by specifying redirect=false and perform the download using the Location header in the response.

    inputTray

    Paper tray

    Specify the paper feed tray for printing in EMF. For this value, specify an index number from "inputTrays" in the printer information.

    In the case of the following "inputTrays" example, specify "6" to print using tray 5 (manual feed).

    Example 5. "inputTrays" example
    "inputTrays":["Conform to printer settings","automatic","tray 1","tray 2","tray 3","tray 4","tray 5 (manual feed)"]


    useEudc

    Use of EUDC

    Specify whether to use EUDC. You can specify the following values.

    • false

      Do not use.

    • true

      Use.

    For EUDC, only private areas of Unicode will be mapped.

    To output EUDC, contact our support center because we need to set it up inside our company.

    adjust

    Print position adjustment

    Specify the print position adjustment in millimeters.

    Specify values in the X and Y directions, separated by commas.

    • Example

      • Specify X and Y directions

        adjust=0.1,-0.2

      • Specify X direction only

        adjust=-0.1,

      • Specify Y direction only

        adjust=,0.2

    copies

    Number of copies

    Specify the number of copies. You can specify in the range from 1 to 999.

    This is ignored when downloading a file.

    defaultSvfEncode

    Default SVF encoding

    Specify the default SVF encoding.

    This parameter is enabled when the extension of the form layout is "xml" and the locale is "English". If SVF encoding is specified in CSV data, the setting here will be ignored.

    The value you specify differs depending on the language of the forms to be output. For details on the values, see "Output forms in languages other than Japanese" in "SVF Cloud Administration Guide".

    *1 The pages with no fields are output differently depending on the file formats.

    • XML file

      Duplicate all pages contained in the form layout as many as the number of records to output.

      illust_xml-xlsxDiff_xml.png
    • Excel file

      Among the sheets included in the form layout file, duplicate only the sheets with fields as many as the number of records to output.

      illust_xml-xlsxDiff_xlsx.png
  • Request header

    Header field

    Value

    Description

    Authorization

    Bearer {your access token}

    Specify the access token retrieved via authentication.



Response

Code

Description

HTTP/1.1 202 Accepted

Indicates that either of the following processes was executed successfully.

  • Direct Print

    A URI that can be used for inquiring about the print status is returned in "Location" in the response header.

  • PDF, EXCEL, or WORD is specified for the "printer" parameter and false is specified for the "redirect" parameter

    A URI that can be used for inquiring about the download is returned in "Location" in the response header.

HTTP/1.1 303 See Other

Indicates that the process was executed successfully. This occurs when PDF, EXCEL, or WORD is specified for the "printer" parameter and true is specified for the "redirect" parameter (If the "redirect" parameter is omitted, true is specified).

A URI that can be used for inquiring about the download is returned in "Location" in the response header.

HTTP/1.1 400 Bad Request

Occurs if the request content is invalid.

HTTP/1.1 401 Unauthorized

Occurs if the authentication information is invalid.

HTTP/1.1 403 Forbidden

Occurs under the following conditions.

  • The execute permission is not assigned.

  • Lack of required points.

HTTP/1.1 429 Too many Requests

Occurs if the number of API calls exceeds the threshold. Execute again after the number of seconds passed for the value returned in "Retry-After" of the response header.

HTTP/1.1 503 Service Unavailable

Occurs if the limit for concurrent processes has been exceeded. Wait for a while and try again.

Retrieve artifact information

This API retrieves information about the specified artifact.

Example 6. Endpoint URI
https://api.svfcloud.com/v1/artifacts/{artifactId}


Example 7. HTTP method

GET



Example 8. Accept header for the HTTP request

application/json



Example 9. Parameters
  • Path parameter

    Path parameter

    Value

    Required

    Description

    artifactId

    Artifact ID

    maru.png

    Specify the ID of the artifact whose information is to be retrieved.

  • Request header

    Header field

    Value

    Description

    Authorization

    Bearer {your access token}

    Specify the access token retrieved via authentication.



Response

Code

Description

HTTP/1.1 200 OK

Indicates that the process was executed successfully.

HTTP/1.1 401 Unauthorized

Occurs if the authentication information is invalid.

HTTP/1.1 404 Not Found

Occurs if the specified artifact does not exist.

HTTP/1.1 429 Too many Requests

Occurs if the number of API calls exceeds the threshold. Execute again after the number of seconds passed for the value returned in "Retry-After" of the response header.

Example 10. Output example (JSON format)
{
  "expiration": "2018-03-08T02:01:49.000Z",
  "id": "8149fed9-dadd-4678-af2d-da2ead6d656d",
  "name": "WingArc",
  "segment": "",
  "sourceType": "CSV",
  "user": {
    "id": "xxxx@api.svfcloud.com",
    "name": "John Smith",
  }
}

Key

Content

Description

id

Artifact ID

The ID that identifies the artifact.

name

Artifact name

The artifact name specified at the time of printing.

expiration

Expiration date and time

The time at which the retention period for the artifact expires. One day is specified by default.

user

User information

Information about the user who created the artifact. This information reflects the user ID specified in the JWT bearer token at the time of printing.

sourceType

Input source type

The type of source data to create a form.

Any key items that are not included in the list are not currently used. They have been defined for future use.



Download artifacts

This API downloads the specified artifact.

Example 11. Endpoint URI
https://api.svfcloud.com/v1/artifacts/{artifactId}


Example 12. HTTP method

GET



Example 13. Accept header for the HTTP request

application/octet-stream



Example 14. Parameters
  • Path parameter

    Path parameter

    Value

    Required

    Description

    artifactId

    Artifact ID

    maru.png

    Specify the ID of the artifact to download.

  • Query parameter

    Query parameter

    Value

    Required

    Description

    action

    Action ID

    maru.png

    Specify the action ID.

    ticket

    One-time ticket

    maru.png

    Specify the one-time ticket information associated with the action.

    timeout

    Timeout time (seconds)

    If not specified, it is set to 60 seconds by default. You can specify up to 900 seconds (15 minutes).

  • Request header

    Header field

    Value

    Description

    Authorization

    Bearer {your access token}

    Specify the access token retrieved via authentication.



Response

Code

Description

HTTP/1.1 200 OK

Indicates that the process was executed successfully. The artifact is returned in the response body.

HTTP/1.1 303 See Other

Indicates that the process was executed successfully. A URI that can be used for inquiring about the download is returned in "Location" in the response header.

HTTP/1.1 400 Bad Request

Occurs if the request content is invalid.

HTTP/1.1 401 Unauthorized

Occurs if the authentication information is invalid.

HTTP/1.1 403 Forbidden

Occurs under the following conditions.

  • The execute permission is not assigned.

  • Lack of required points.

HTTP/1.1 404 Not Found

Occurs if the specified artifact does not exist.

HTTP/1.1 408 Request Timeout

Occurs if the timeout period expires before the process finishes.

HTTP/1.1 429 Too many Requests

Occurs if the number of API calls exceeds the threshold. Execute again after the number of seconds passed for the value returned in "Retry-After" of the response header.

HTTP/1.1 503 Service Unavailable

Occurs if a valid service plan or point does not exist.

Retrieve form images

This API retrieves the form image for the specified page.

Example 15. Endpoint URI
https://api.svfcloud.com/v1/artifacts/{artifactId}/{page}


Example 16. HTTP method

GET



Example 17. Accept header for the HTTP request

image/png



Example 18. Parameters
  • Path parameter

    Path parameter

    Value

    Required

    Description

    artifactId

    Artifact ID

    maru.png

    Specify the ID of the artifact for which null is specified for the "printer" parameter when "executing a print job".

    page

    Page number

    maru.png

    Specify the page number for which the image is to be retrieved.

  • Query parameter

    Query parameter

    Value

    Required

    Description

    timeout

    Timeout time (seconds)

    If not specified, it is set to 60 seconds by default. You can specify up to 900 seconds (15 minutes).

  • Request header

    Header field

    Value

    Description

    Authorization

    Bearer {your access token}

    Specify the access token retrieved via authentication.



Response

Code

Description

HTTP/1.1 200 OK

Indicates that the process was executed successfully.

HTTP/1.1 400 Bad Request

Occurs if the request content is invalid.

HTTP/1.1 401 Unauthorized

Occurs if the authentication information is invalid.

HTTP/1.1 403 Forbidden

Occurs under the following conditions.

  • The execute permission is not assigned.

  • Lack of required points.

HTTP/1.1 404 Not Found

Occurs if the specified artifact does not exist.

HTTP/1.1 408 Request Timeout

Occurs if the timeout period expires before the process finishes.

HTTP/1.1 429 Too many Requests

Occurs if the number of API calls exceeds the threshold. Execute again after the number of seconds passed for the value returned in "Retry-After" of the response header.

HTTP/1.1 503 Service Unavailable

Occurs if a valid service plan or point does not exist.