Aspose.Pdf.Examples.CSharp.AsposePDF.DocumentConversion.PDFToHTMLFormat.OutPutToStream.Strategy_11_CUSTOM_SAVE_OF_FONTS_AND_IMAGES C# (CSharp) Method

Strategy_11_CUSTOM_SAVE_OF_FONTS_AND_IMAGES() private static method

private static Strategy_11_CUSTOM_SAVE_OF_FONTS_AND_IMAGES ( SaveOptions resourceSavingInfo ) : string
resourceSavingInfo SaveOptions
return string
        private static string Strategy_11_CUSTOM_SAVE_OF_FONTS_AND_IMAGES(SaveOptions.ResourceSavingInfo resourceSavingInfo)
        {
            if (!Directory.Exists(_folderForReferencedResources_34748))
            {
                Directory.CreateDirectory(_folderForReferencedResources_34748);
            }
            string path = _folderForReferencedResources_34748 + Path.GetFileName(resourceSavingInfo.SupposedFileName);
            // The first path of this method is for saving fonts
            System.IO.BinaryReader contentReader = new BinaryReader(resourceSavingInfo.ContentStream);
            System.IO.File.WriteAllBytes(path, contentReader.ReadBytes((int)resourceSavingInfo.ContentStream.Length));
            string urlThatWillBeUsedInHtml = "file:///" + _folderForReferencedResources_34748.Replace(@"\", "/") + Path.GetFileName(resourceSavingInfo.SupposedFileName);
            return urlThatWillBeUsedInHtml;
        }
        // ExEnd:OutPutToStreamHelper