Skip to content

Commit

Permalink
update newtonsoft and fix interface for thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
apexdodge committed Feb 2, 2023
1 parent ba7da64 commit 3ac22ea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Api2Pdf.DotNet/Api2Pdf.DotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<Description>
This client library is a wrapper for the Api2Pdf.com REST API. See full REST api documentation at https://www.api2pdf.com/documentation/v2. Api2Pdf is a powerful API that supports HTML to PDF, URL to PDF, HTML to Image, URL to Image, Thumbnail / image preview of an Office file, Office files (Word to PDF), HTML to Docx, HTML to excel, PDF to HTML, merge PDFs together, add bookmarks to PDFs, add passwords to PDFs, extract pages out of a PDF
</Description>
<Version>2.1.0</Version>
<Version>2.1.1</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions Api2Pdf.DotNet/Api2Pdf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public interface ILibreOffice
{
Api2PdfResult AnyToPdf(LibreFileConversionRequest request);
Task<Api2PdfResult> AnyToPdfAsync(LibreFileConversionRequest request);
Api2PdfResult Thumbnail(LibreFileConversionRequest request);
Task<Api2PdfResult> ThumbnailAsync(LibreFileConversionRequest request);
Api2PdfResult PdfToHtml(LibreFileConversionRequest request);
Task<Api2PdfResult> PdfToHtmlAsync(LibreFileConversionRequest request);
Api2PdfResult HtmlToDocx(LibreFileConversionRequest request);
Expand Down
8 changes: 8 additions & 0 deletions Api2Pdf.Examples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ static void Main(string[] args)

Console.WriteLine($"LibreOffice Docx to PDF: {result.FileUrl}");

//LibreOffice - Thumbnail to PDF
result = a2pClient.LibreOffice.Thumbnail(new LibreFileConversionRequest
{
Url = sampleDocxFile
});

Console.WriteLine($"LibreOffice Thumbnail: {result.FileUrl}");

//LibreOffice - Html to Docx
result = a2pClient.LibreOffice.HtmlToDocx(new LibreFileConversionRequest
{
Expand Down

0 comments on commit 3ac22ea

Please sign in to comment.