I have done the WhatsApp Business API integration(graph.facebook.com) with d65fo to send pdf through URL, But it is send .bin extension file instead of .pdf extension.

I am getting the URL from file stream below is the controller class code. how I can get .pdf extension?
public static void main(Args _args)
{
ZTSalesInvoiceControllerWhatsapp controller = new ZTSalesInvoiceControllerWhatsapp();
controller.parmReportName(ssrsReportStr(ZTSalesInvoiceZCopy,Report));
ZTProformaContractWhatsapp contract = new ZTProformaContractWhatsapp();
SRSPrintDestinationSettings settings;
container binData;
Binary binaryData;
Filename fileName = 'invoice.pdf';
str ret;
System.Byte[] reportBytes = new System.Byte[0]();
SRSProxy srsProxy;
SRSReportRunService srsReportRunService = new SrsReportRunService();
Microsoft.Dynamics.AX.Framework.Reporting.Shared.ReportingService.ParameterValue[] parameterValueArray;
Map reportParametersMap;
SRSReportExecutionInfo executionInfo = new SRSReportExecutionInfo();
contract.parmSalesId('SO-645459');
controller.parmLoadFromSysLastValue(false);
controller.parmReportContract().parmRdpContract(contract);
settings = controller.parmReportContract().parmPrintSettings();
settings.printMediumType(SRSPrintMediumType::File);
settings.fileName(fileName);
settings.fileFormat(SRSReportFileFormat::PDF);
settings.parmSendToPrinterAsPdf(true);
settings.pack();
// Below is a part of code responsible for rendering the report
//contract = this.parmReportContract().parmRdpContract() as ZTSalesInvoiceControllerWhatsapp;
controller.parmReportContract().parmReportServerConfig(SRSConfiguration::getDefaultServerConfiguration());
controller.parmReportContract().parmReportExecutionInfo(executionInfo);
srsReportRunService.getReportDataContract(controller.parmreportcontract().parmReportName());
srsReportRunService.preRunReport(controller.parmreportcontract());
reportParametersMap = srsReportRunService.createParamMapFromContract(controller.parmReportContract());
parameterValueArray = SrsReportRunUtil::getParameterValueArray(reportParametersMap);
srsProxy = SRSProxy::constructWithConfiguration(controller.parmReportContract().parmReportServerConfig());
// Actual rendering to byte array
reportBytes = srsproxy.renderReportToByteArray
(controller.parmreportcontract().parmreportpath(),
parameterValueArray,
settings.fileFormat(SRSReportFileFormat::PDF),
settings.deviceinfo());
System.IO.Stream mstream = new System.IO.MemoryStream(reportBytes);
str link = File::SendFileToTempStore(mstream, fileName);
str destinationUrl = 'https://graph.facebook.com/v15.0/{}/messages';
str requestJson,responseJson;
System.Net.HttpWebRequest request;
System.Net.HttpWebResponse response = new System.Net.HttpWebResponse();
CLRObject clrObj;
System.Byte[] bytes;
System.Text.Encoding utf8;
System.IO.Stream requestStream, responseStream;
System.IO.StreamReader streamReader;
System.Exception ex;
System.Net.WebHeaderCollection httpHeader;
System.Net.ServicePoint servicePt;
str byteStr;
System.Byte[] byteArray;
str num = '9665';
str jsonStr = "{\"to\":\"" num "\",\"messaging_product\":\"whatsapp\", \"type\":\"template\",\"template\":{ \"components\":[{ \"type\":\"header\",\"parameters\":[{ \"type\":\"document\", \"document\":{";
jsonStr = jsonStr "\"link\":\"" link "\"}}]}, {\"type\":\"body\"}],\"language\":{ \"policy\":\"deterministic\",\"code\":\"AR\"},\"name\":\"invoice_arabic\" \}}";
try
{
new InteropPermission(InteropKind::ClrInterop).assert();
httpHeader = new System.Net.WebHeaderCollection();
request = System.Net.WebRequest::Create(destinationUrl);
utf8 = System.Text.Encoding::get_UTF8();
bytes = utf8.GetBytes(jsonStr);
request.set_Method("POST");
str token = " ";
httpHeader.add(@'Authorization: Bearer ' token);
request.set_Headers(httpHeader);
request.ContentType = 'application/json';
request.set_ContentLength(bytes.get_Length());
requestStream = request.GetRequestStream();
requestStream.Write(bytes, 0, bytes.get_Length());
response = request.GetResponse();
responseStream = response.GetResponseStream();
streamReader = new System.IO.StreamReader(responseStream);
responseJson = streamReader.ReadToEnd();
info(responseJson);
}
catch (Exception::CLRError)
{
ex = CLRInterop::getLastException().GetBaseException();
error(ex.get_Message());
}
requestStream.Close();
streamReader.Close();
responseStream.Close();
response.Close();
controller.parmArgs(_args);
controller.parmShowDialog(False);
controller.startOperation();
}