In my server program i am writing like this:-if(cgi_get_varval(buffer,“download”,cgi_data,sizeof(cgi_data))==1)
{
if(strcmp(cgi_data,“true”)==0)
{ char file_buf[300];
sprintf(file_buf,"%s",“abcdef”);
response.content_type = HTTPSRV_CONTENT_TYPE_PDF;
response.data = file_buf; //buf;//cgi_data;
response.data_length = strlen(file_buf);
response.content_length = response.data_length;
HTTPSRV_cgi_write(&response);
}}
And postman is my client in that i am receving in text format and preview also i am able to see in text format but i want to see in pdf format but it is not showing in that format.and i am downloading the reponse in pdf format but it is not able to open.
why? and how to resolve this issue? what is the correct format for the pdf file?