// @ts-ignore
/* eslint-disable */
import request from "../poster-request";

/** 生成PDF 从网页URL或HTML内容生成PDF文档 POST /api/v1/pdf */
export async function postApiV1Pdf(
  body: {
    /** 要生成PDF的网页URL */
    webpage?: string;
    /** 要生成PDF的HTML内容（可选，优先级高于webpage） */
    html?: string;
    /** 设备缩放因子 */
    device?: number;
    /** PDF宽度 */
    width?: number;
    /** PDF高度 */
    height?: number;
  },
  options?: { [key: string]: any },
) {
  return request<{
    success?: boolean;
    data?: { name?: string; path?: string };
    message?: string;
    code?: number;
  }>("/api/v1/pdf", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
