Related Article(s):
Last active
January 20, 2023 10:00
-
-
Save GroupDocsGists/2f133d40ed82eeafaa4896a21dddf251 to your computer and use it in GitHub Desktop.
How to Convert PDF to HTML using C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using GroupDocs.Conversion.Options.Convert; | |
... | |
// Convert PDF to HTML using C# | |
using (var converter = new GroupDocs.Conversion.Converter("path/document.pdf")) | |
{ | |
var options = new WebConvertOptions(); | |
converter.Convert("path/converted-pdf-to.html", options); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert selected pages of password protected PDF to HTML using C# | |
using GroupDocs.Conversion.Options.Convert; | |
using GroupDocs.Conversion.Options.Load; | |
... | |
Func<LoadOptions> getLoadOptions = () => new PdfLoadOptions | |
{ | |
Password = "file-password_123" | |
}; | |
using (Converter converter = new Converter("path/protected-document.pdf", getLoadOptions)) | |
{ | |
// Prepare conversion options | |
WebConvertOptions options = new WebConvertOptions | |
{ | |
PageNumber = 2, | |
FixedLayout = true, | |
PagesCount = 1, | |
FixedLayoutShowBorders = false | |
}; | |
converter.Convert("path/converted-adv-pdf-to-.html", options); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment