How to write the PDF file's contain using get_ResponseStream() [or get_responseText()] ?
I've tried this following VP 7.3 code without success because my htmlSource PDF file contain a lot of "???" :
Code: Select all
XML = xmlhttp60::new(),
XMLR = XML:get_IXMLHTTPRequest_import(),
XMLR:predicate_open("GET","ftp://my_IP_server/my_folder/My_PDF_file.pdf",comDomains::boolean(false),comDomains::string("my_user_name"),comDomains::string("my_password")),
XMLR:send(comDomains::null) , !,
Status = XMLR:get_Status(),
stdio::writef("Status= %\n",Status),
StatusText = XMLR:get_StatusText(),
stdio::writef("StatusText= %\n",StatusText),
ReadyState = XMLR:get_readyState(),
stdio::writef("ReadyState= %\n",ReadyState),
ResponseStream = XMLR:get_ResponseStream(),
stdio::writef("ResponseStream= %\n",ResponseStream),
if ResponseStream = comDomains::iUnknown(Val) then
OS = outputStream_file::create("htmlSource.pdf"),
OS:write(Val),
OS:close()
end if,
Html = XMLR:get_responseText(),
file::writeCodedString("htmlSource2.pdf",Html,ansi()),
!.