Cake.MarkdownToPdf
3.0.5
dotnet add package Cake.MarkdownToPdf --version 3.0.5
NuGet\Install-Package Cake.MarkdownToPdf -Version 3.0.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cake.MarkdownToPdf" Version="3.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cake.MarkdownToPdf" Version="3.0.5" />
<PackageReference Include="Cake.MarkdownToPdf" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cake.MarkdownToPdf --version 3.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Cake.MarkdownToPdf, 3.0.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Cake.MarkdownToPdf&version=3.0.5
#tool nuget:?package=Cake.MarkdownToPdf&version=3.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Cake.MarkdownToPdf
Cake addin to convert markdown files to pdf. This addin uses Markdig markdown processor.
Starting with Version 3.0 the adding requires a Wkhtmltopdf "installation". Please use a wkhtmltopdf package that fit your needs (version and platform).
Usage
Directly in your build script via a Cake #addin
directive:
#addin "Cake.MarkdownToPdf"
#tool "nuget:?package=wkhtmltopdf.x64&version=0.12.6"
Task("Convert")
.Does(() => {
MarkdownFileToPdf("readme.md", "output.pdf");
// or markdown text
MarkdownToPdf("Some markdown formated text...", "output.pdf");
// or using settings
MarkdownFileToPdf("readme.md", "output.pdf", settings => {
settings.Theme = Themes.Github;
// optional set path to your Wkhtmltopdf. Otherwise Cake will try to resolve it automatically.
settings.ToolPath = "..\wkhtmltopdf.exe";
settings.UseAdvancedMarkdownTables(); // or UseAdvancedMarkdownExtensions();
// accessing the internal markdig markdown pipeline
settings.MarkdownPipeline.UseGridTables();
// optional
settings.Debug = true; // do not delete generated html file
});
});
Themes
Use can use the build-in "Default" or "Github" theme or define any css style on your own
Task("Convert")
.Does(() => {
// custom css
MarkdownFileToPdf("readme.md", "output.pdf", settings => {
settings.CssFile = "path to my css";
// optional
settings.HtmlTemplateFile = "path to my custom html file"; // using {$html} placeholder
});
});
PDF settings
Settings such as orientation, margins etc can be set through the PdfSettings:
Task("Convert")
.Does(() => {
MarkdownFileToPdf("readme.md", "output.pdf", settings => {
settings.Pdf.PageSize = PdfPageSize.Letter;
// check https://wkhtmltopdf.org/usage/wkhtmltopdf.txt for all available options
settings.Pdf.AdditionalGlobalOptions = "--title \"READ ME\"";
settings.Pdf.AdditionalPageOptions = "--default-header";
});
});
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Cake.MarkdownToPdf:
Repository | Stars |
---|---|
Phrynohyas/eve-o-preview
An EVE client window switcher tool created to aid playing with multiple clients in CCP game EVE Online
|
Version | Downloads | Last updated |
---|---|---|
3.0.5 | 1,223 | 5/31/2024 |
3.0.4 | 1,812 | 1/23/2023 |
3.0.3 | 586 | 1/23/2023 |
3.0.2 | 823 | 1/23/2023 |
3.0.1 | 851 | 1/23/2023 |
3.0.0 | 784 | 1/23/2023 |
2.5.3 | 790 | 1/23/2023 |
2.5.2 | 33,556 | 8/13/2019 |
2.5.1 | 1,062 | 7/25/2019 |
2.5.0 | 2,064 | 2/14/2019 |
0.5.5 | 1,418 | 10/26/2018 |
0.5.4 | 1,196 | 10/24/2018 |
0.5.3 | 2,066 | 6/13/2018 |
0.5.2 | 583 | 6/13/2018 |
0.4.7-preview | 1,422 | 6/7/2018 |
0.4.6 | 1,894 | 1/8/2018 |
0.4.4 | 1,428 | 9/18/2017 |
0.4.3 | 1,377 | 9/15/2017 |
0.4.2 | 1,435 | 9/15/2017 |
0.4.0 | 1,480 | 9/11/2017 |
0.3.5 | 1,385 | 9/5/2017 |
0.3.4 | 1,328 | 9/5/2017 |
0.3.3 | 1,313 | 9/5/2017 |
0.3.2 | 1,331 | 9/5/2017 |
0.3.0 | 1,268 | 9/5/2017 |
0.2.2 | 1,335 | 9/4/2017 |
0.2.1 | 1,272 | 9/4/2017 |
0.2.0 | 1,343 | 9/4/2017 |
0.1.0 | 1,259 | 9/4/2017 |