PdfFocusCHtmlOptionsImageSubFolder Property |
Gets or sets a folder name which will be created by the component to store images. Default value: "images".
Namespace: SautinSoftAssembly: SautinSoft.PdfFocus (in SautinSoft.PdfFocus.dll) Version: 2024.12.2
Syntax public string ImageSubFolder { get; set; }
Public Property ImageSubFolder As String
Get
Set
Property Value
StringRemarks
For converting physical files or "images" for conversion in memory.
Must be without any drive letters "C:\.." or "D:\" etc, only the folder as "myfolder".
Example How to set a location of images during PDF to HTML in C#
using System;
using System.IO;
using SautinSoft;
namespace Sample
{
class Sample
{
static void Main(string[] args)
{
string pdfFile = Path.GetFullPath(@"..\..\..\simple text.pdf");
string htmlFile = "Result.html";
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
f.HtmlOptions.ImageFolder = Path.GetDirectoryName(htmlFile);
f.EmbeddedImagesFormat = PdfFocus.eImageFormat.Jpeg;
f.EmbeddedJpegQuality = 95;
f.HtmlOptions.ImageSubFolder = String.Format("{0}_images", Path.GetFileNameWithoutExtension(pdfFile));
f.HtmlOptions.ImageFileName = "picture";
f.HtmlOptions.ImageNumStart = 100;
f.HtmlOptions.IncludeImageInHtml = false;
f.OpenPdf(pdfFile);
if (f.PageCount > 0)
{
int res = f.ToHtml(htmlFile);
if (res == 0)
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(htmlFile) { UseShellExecute = true });
}
}
}
}
How to set a location of images during PDF to HTML in VB.Net
Imports System
Imports System.IO
Imports SautinSoft
Namespace Sample
Friend Class Sample
Shared Sub Main(ByVal args() As String)
Dim pdfFile As String = Path.GetFullPath("..\..\..\simple text.pdf")
Dim htmlFile As String = "Result.html"
Dim f As New SautinSoft.PdfFocus()
f.HtmlOptions.ImageFolder = Path.GetDirectoryName(htmlFile)
f.EmbeddedImagesFormat = PdfFocus.eImageFormat.Jpeg
f.EmbeddedJpegQuality = 95
f.HtmlOptions.ImageSubFolder = String.Format("{0}_images", Path.GetFileNameWithoutExtension(pdfFile))
f.HtmlOptions.ImageFileName = "picture"
f.HtmlOptions.ImageNumStart = 100
f.HtmlOptions.IncludeImageInHtml = False
f.OpenPdf(pdfFile)
If f.PageCount > 0 Then
Dim res As Integer = f.ToHtml(htmlFile)
If res = 0 Then
System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo(htmlFile) With {.UseShellExecute = True})
End If
End If
End Sub
End Class
End Namespace
See Also