Skip to content

Commit 6f92879

Browse files
committed
1003828-ug: Added proper HTM to PDF FAQ content.
1 parent 6f375c0 commit 6f92879

1 file changed

Lines changed: 29 additions & 5 deletions

File tree

Document-Processing/PDF/Conversions/HTML-To-PDF/NET/troubleshooting.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,22 +1560,46 @@ N> We have option to exclude the default Blink binaries from the installation pa
15601560

15611561
## How to Exclude BlinkBinaries or Runtime Files in Build or Deployment
15621562

1563-
The runtime files, or blink binaries, will be copied into a bin or published folder while building and publishing the application.
1564-
By including the <ExcludeAssets>native</ExcludeAssets> option in the package reference of the csproj file, you can exclude the runtime files or blink binaries from being copied into the bin or publish folder while building and publishing the application. But you need to place the BlinkBinaries in the server disk and set the BlinkPath in the BlinkConverterSettings to perform the conversion.
1563+
When you build or publish the application, the Syncfusion HTML‑to‑PDF converter automatically copies the Blink runtime files (BlinkBinaries) into the <i>bin</i> or <i>publish</i> output folder. These binaries are required for HTML‑to‑PDF conversion at runtime. However, in certain deployment scenarios—such as reducing the deployment size or using a shared/system‑installed Chromium—you can exclude these files and instead provide the Blink binaries manually on the host machine.
1564+
1565+
To exclude BlinkBinaries during the build process, configure your project file depending on whether you are using <b>.NET Core/.NET or .NET Framework</b>.
15651566

1566-
N> Using this approach, you can reduce the deployment size on your own servers.
1567+
<b>Exclude BlinkBinaries in .NET Core</b>
1568+
You can prevent runtime files from being included by restricting the package to <b>compile-only</b> assets using the <b>IncludeAssets</b> tag in the <b>PackageReference</b>. This stops all Blink runtime binaries from being copied into the output folder.
15671569

15681570
Refer to the following package reference:
15691571

15701572
{% tabs %}
15711573
{% highlight C# %}
15721574

15731575
<ItemGroup>
1574-
<PackageReference Include="Syncfusion.HtmlToPdfConverter.Net.Windows" Version="31.1.23">
1575-
<ExcludeAssets>native</ExcludeAssets>
1576+
<PackageReference Include="Syncfusion.HtmlToPdfConverter.Net.Windows" Version="32.1.21">
1577+
<IncludeAssets>compile</IncludeAssets>
15761578
</PackageReference>
15771579
</ItemGroup>
15781580

15791581
{% endhighlight %}
15801582
{% endtabs %}
15811583

1584+
By using <b>IncludeAssets="compile"</b>, only the required compile-time metadata is included, and all runtime dependencies (BlinkBinaries) are excluded from the final build or publish output.
1585+
1586+
N> If you exclude runtime files, you must manually place BlinkBinaries on the server and configure BlinkPath in BlinkConverterSettings for conversion to work.
1587+
1588+
<b>Exclude BlinkBinaries in .NET Framework Projects</b>
1589+
1590+
For .NET Framework applications, Blink runtime files are included through a .targets file referenced in the project.
1591+
To exclude BlinkBinaries, simply remove this import entry.
1592+
1593+
{% tabs %}
1594+
{% highlight C# %}
1595+
1596+
<Import Project="packages\Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.32.1.20\build\net462\Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.targets" Condition="Exists('packages\Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.32.1.20\build\net462\Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.targets')" />
1597+
1598+
{% endhighlight %}
1599+
{% endtabs %}
1600+
1601+
Removing this line prevents the Syncfusion<sup>&reg;</sup> build targets from copying BlinkBinaries and other runtime files into your bin folder during build or publish.
1602+
1603+
N> By excluding BlinkBinaries, you can significantly reduce the size of your deployment package, especially in server environments where disk usage and deployment time matter.
1604+
1605+

0 commit comments

Comments
 (0)