GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureDocumentConverter Class / SaveAsHTML Method / SaveAsHTML(String,HtmlLayoutType) Method
The file path where the converted file will be saved. If the specified file already exists, it will be overwritten.
Example





In This Topic
SaveAsHTML(String,HtmlLayoutType) Method
In This Topic
This method converts the currently loaded document to HTML and saves it to the specified file path.
Syntax
'Declaration
 
Public Overloads Function SaveAsHTML( _
   ByVal FilePath As String, _
   ByVal layoutType As HtmlLayoutType _
) As GdPictureStatus
public GdPictureStatus SaveAsHTML( 
   string FilePath,
   HtmlLayoutType layoutType
)
public function SaveAsHTML( 
    FilePath: String;
    layoutType: HtmlLayoutType
): GdPictureStatus; 
public function SaveAsHTML( 
   FilePath : String,
   layoutType : HtmlLayoutType
) : GdPictureStatus;
public: GdPictureStatus SaveAsHTML( 
   string* FilePath,
   HtmlLayoutType layoutType
) 
public:
GdPictureStatus SaveAsHTML( 
   String^ FilePath,
   HtmlLayoutType layoutType
) 

Parameters

FilePath
The file path where the converted file will be saved. If the specified file already exists, it will be overwritten.
layoutType

Return Value

A member of the GdPictureStatus enumeration. If processing is successful, then the return value is GdPictureStatus.OK.
Remarks
You have to specify a full file path, including the file extension (.pptx).
Example
Converting and saving a PDF document to a HTML file using a stream.
using GdPicture14;
            
using GdPictureDocumentConverter converter = new();
            
var status = converter.LoadFromFile("input.pdf");
if (status != GdPictureStatus.OK)
{
    throw new Exception(status.ToString());
}
            
status = converter.SaveAsHTML("output.html", HtmlLayoutType.PageLayout);
if (status != GdPictureStatus.OK)
{
    throw new Exception(status.ToString());
}
            
Console.WriteLine("The input document has been converted to a html file");
See Also