Skip to main content

Format Conversion

For some special scenarios, such as data security requirements, network policies, etc., HAP also provides a way for self integration.

Tips:

For the header parameters in the interface, if it is in an intranet environment, consider ignoring authentication logic.

Please ensure that the servers deploying microservices have normal connectivity with ENV_WPS_HOST.

After completing interface development, you need to add the following 5 environment variables in the configuration file of the HAP microservice:

ENV_WPS_HOST: "Host address, default to https://solution.wps.cn"
ENV_WPS_CONVERT_PDF_API_PATH: "Request path for converting documents to pdf, default to /api/developer/v1/office/convert/to/pdf"
ENV_WPS_CONVERT_TASK_API_PATH: "Request path for querying format conversion results, default to /api/developer/v1/tasks/:task_id"
ENV_WPS_CONVERT_APPID: "Any string"
ENV_WPS_CONVERT_APPSECRET: "Any string"

Finally, restart the HAP microservice.