I have created a pdf file on azure storage and now i want to write few contents into the pdf file .
Is it possible so? If yes kindly help me in this regard
Thank You
if not TempBlob.Blob.HasValue() then
exit;
WMSMgmt.FindSet();
cha[1] := 10;
msVersion := '2015-02-21';
keyss := WMSMgmt."Azure Key"; //GetAccountAccessKey();
dateInRfc1123Format := GetUTCDateTimeText(); // <------------ Changed
requestMethod := 'PUT';
urlPath := WMSMgmt."Azure Lable Share Name" + '/' + FileName + '?comp=range';//'lables/'
CanonicalizedResource := ConvertStr(StrSubstNo('/%1/%2', WMSMgmt."Azure Storage Account Name", urlPath), '?=', cha + ':');
TempBlob.Blob.CreateInStream(InStr, TextEncoding::UTF8);
content.WriteFrom(InStr);
ContentLength := TempBlob.Blob.Length;
ContentHeaders.Clear();
content.GetHeaders(ContentHeaders);
ContentHeaders.Add('Content-Length', Format(ContentLength, 0, 9));
ContentHeaders.Remove('Content-Type');
request.Content := content;
Range := 'bytes=0-' + Format(contentLength - 1, 0, 9);
canonicalizedHeaders := 'x-ms-date:' + dateInRfc1123Format + Format(cha) +
'x-ms-range:' + Range + Format(cha) +
'x-ms-version:' + msVersion + Format(cha) +
'x-ms-write:' + 'update';
stringToSign := (requestMethod + Format(cha) +
Format(cha) +
Format(cha) +
Format(contentLength, 0, 9) + Format(cha) +
Format(cha) +
Format(cha) +
Format(cha) +
Format(cha) +
Format(cha) +
Format(cha) +
Format(cha) +
Format(cha) +
canonicalizedHeaders + Format(cha) + // <------------ Changed
canonicalizedResource);
authorizationHeader := 'SharedKey ' + WMSMgmt."Azure Storage Account Name" + ':' + EncryptionManagement.GenerateBase64KeyedHashAsBase64String(stringToSign, keyss, 2);
uri := StrSubstNo('https://%1.file.core.windows.net/%2', WMSMgmt."Azure Storage Account Name", urlPath);
request.SetRequestUri(uri);
request.Method := requestMethod;
RequestHeader.Clear();
request.GetHeaders(RequestHeader);
RequestHeader.Add('Authorization', authorizationHeader);
RequestHeader.Add('x-ms-date', dateInRfc1123Format);
RequestHeader.Add('x-ms-range', Range);
RequestHeader.Add('x-ms-version', msVersion);
RequestHeader.Add('x-ms-write', 'update');
client.Send(request, hhtpres);
if not hhtpres.IsSuccessStatusCode then
Error(hhtpres.ReasonPhrase);
This is writing contents to a file on azure storage for all formats other than PDF. I want to write contents to PDF file