-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
865893 : Add scale property in HTML converter.
- Loading branch information
1 parent
be13356
commit 4efcbce
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
HTML to PDF/Blink/HTML-to-PDF-scale-property/Scale_property_in_HTML_converter.sln
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.8.34330.188 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scale_property_in_HTML_converter", "Scale_property_in_HTML_converter\Scale_property_in_HTML_converter.csproj", "{DF049042-5B7C-4589-83BE-46451D5B7932}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{DF049042-5B7C-4589-83BE-46451D5B7932}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{DF049042-5B7C-4589-83BE-46451D5B7932}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{DF049042-5B7C-4589-83BE-46451D5B7932}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{DF049042-5B7C-4589-83BE-46451D5B7932}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {86A1E28F-2A87-4324-A248-4F416B31440C} | ||
EndGlobalSection | ||
EndGlobal |
20 changes: 20 additions & 0 deletions
20
HTML to PDF/Blink/HTML-to-PDF-scale-property/Scale_property_in_HTML_converter/Program.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
| ||
using Syncfusion.HtmlConverter; | ||
using Syncfusion.Pdf; | ||
|
||
//Initialize the HTML to PDF converter. | ||
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); | ||
//Initialize blink converter settings. | ||
BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); | ||
//Set the Scale. | ||
blinkConverterSettings.Scale = 1.0f; | ||
//Assign Blink converter settings to HTML converter. | ||
htmlConverter.ConverterSettings = blinkConverterSettings; | ||
//Convert URL to PDF document. | ||
PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com"); | ||
//Create a file stream. | ||
FileStream fileStream = new FileStream("HTMLtoPDF.pdf", FileMode.Create, FileAccess.ReadWrite); | ||
//Save a PDF document to a file stream. | ||
document.Save(fileStream); | ||
//Close the document. | ||
document.Close(true); |
14 changes: 14 additions & 0 deletions
14
...F-scale-property/Scale_property_in_HTML_converter/Scale_property_in_HTML_converter.csproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.HtmlToPdfConverter.Net.Windows" Version="24.1.45" /> | ||
</ItemGroup> | ||
|
||
</Project> |