#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://api.gugudata.com/imagerecognition/html2pdf?appkey=YOUR_APPKEY");
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: application/x-www-form-urlencoded");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "type=HTML&content=%3c!doctype+html%3e%3chtml+lang%3d%22zh-CN%22%3e%3cmeta+charset%3d%22utf-8%22%3e%3cbody%3e%3ch1%3e%e7%bd%91%e9%a1%b5%e5%bd%92%e6%a1%a3%e7%a4%ba%e4%be%8b%3c%2fh1%3e%3cp%3e%e4%b8%ad%e6%96%87%e4%b8%8e+English+%e5%86%85%e5%ae%b9%e3%80%82%3c%2fp%3e%3c%2fbody%3e%3c%2fhtml%3e&landscape=0&showpages=1&filename=%e7%bd%91%e9%a1%b5%e5%bd%92%e6%a1%a3%e7%a4%ba%e4%be%8b&storage=public");
CURLcode res = curl_easy_perform(curl);
(void)res;
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}