Skip to content

Commit 170212b

Browse files
Merge pull request #1495 from syncfusion-content/847609_UG
847609: Need to update UG documentation in HTMLTOPDF section
2 parents 801edc7 + dd6f8ad commit 170212b

File tree

2 files changed

+27
-25
lines changed

2 files changed

+27
-25
lines changed
64.5 KB
Loading

File-Formats/PDF/Convert-HTML-To-PDF/troubleshooting.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,50 +8,52 @@ documentation: UG
88

99
# Troubleshooting and FAQ
1010

11-
## BlinkBinaries are missing
11+
## Blink files are missing
1212

1313
<table>
1414
<th style="font-size:14px" width="100px">Exception</th>
15-
<th style="font-size:14px">BlinkBinaries are missing</th>
15+
<th style="font-size:14px">Blink files are missing</th>
1616
<tr>
1717
<th style="font-size:14px" width="100px">Reason
1818
</th>
19-
<td>When BlinkBinaries are not available in the <i>BlinkPath </i> mentioned location.
19+
<td>The exception may occur if the <i>'runtimes'</i> folder is not copied correctly from the NuGet folder.
2020
</td>
2121
</tr>
2222
<tr>
2323
<th style="font-size:14px" width="100px">Solution</th>
2424
<td>
25-
Set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.
25+
Ensure that the runtimes folder is copied properly to bin folder of the application from NuGet package location.
26+
<br/><br/>
27+
Please refer to the below screenshot,
28+
<br/><br/>
29+
<img src="htmlconversion_images/runtime_folder.png">
2630
<br/><br/>
2731
(Or)
2832
<br/><br/>
29-
Place the BlinkBinaries folder in bin folder of the project.
33+
You can set the runtimes folder path explicitly in BlinkPath property in BlinkConverterSettings class.
3034
<br/><br/>
31-
The BlinkBinaries will be available in the HTMLConverter installed location <span style="color:gray;font-size:14px"><i>($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)</i> </span>
32-
<br><br/>
33-
The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
34-
35-
</td>
36-
</tr>
37-
38-
<tr>
39-
<th style="font-size:14px" width="100px">Mapping BlinkBinaries in Web Application</th>
40-
<td>
41-
{% highlight c# tabtitle="C#" %}
42-
43-
//To refer BlinkBinaries from project location
44-
settings.BlinkPath = Server.MapPath("BlinkBinaries");
45-
46-
//or
35+
Ex path: <i>C:\HtmlConversion\HTMl-to-PDF\HTMl-to-PDF\bin\Debug\net7.0\runtimes\win-x64\native\</i>
36+
<br/><br/>
37+
{% highlight html %}
4738

48-
// To refer BlinkBinaries from bin folder of the Project
49-
settings.BlinkPath = Server.MapPath("~/bin/BlinkBinaries");
39+
//Initialize the HTML to PDF converter.
40+
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
41+
BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings();
42+
//Set Blink the binaries path.
43+
blinkConverterSettings.BlinkPath = @"C:/HtmlConversion/BlinkBinaries/";
44+
//Assign the Blink converter settings to HTML converter.
45+
htmlConverter.ConverterSettings = blinkConverterSettings;
46+
//Convert the URL to PDF document.
47+
PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
48+
//Create a file stream to save the PDF document.
49+
FileStream fileStream = new FileStream("HTML-to-PDF.pdf", FileMode.CreateNew, FileAccess.ReadWrite);
50+
//Save and close the PDF document.
51+
document.Save(fileStream);
52+
document.Close(true);
5053

5154
{% endhighlight %}
52-
53-
</td>
5455
</tr>
56+
5557
</table>
5658

5759
## BlinkBinaries access is denied in server

0 commit comments

Comments
 (0)