Skip to content

Instantly share code, notes, and snippets.

@aspose-cloud
Last active September 8, 2021 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-cloud/dfd52b572ea311b6df28032a54191b89 to your computer and use it in GitHub Desktop.
Save aspose-cloud/dfd52b572ea311b6df28032a54191b89 to your computer and use it in GitHub Desktop.
This Gist contains code snippets related to Converting EPUB to PDF using C# .NET
This Gist contains code snippets related to Converting EPUB to PDF using C# .NET
// Get ClientID from https://dashboard.aspose.cloud/
string clientSecret = "caac6e3d4a4724b2feb53f4e460eade3";
string clientID = "4ccf1790-accc-41e9-8d18-a78dbb2ed1aa";
// Create an instance of PdfApi
PdfApi pdfApi = new PdfApi(clientSecret, clientID);
// input EPUB file
String inputFile = "Sway.epub";
// resultant PDF document
String resultant = "conveted.pdf";
try
{
// call the API to perform conversion
var response = pdfApi.PutEpubInStorageToPdf(resultant, inputFile);
// In case of success, print the success message
if (response != null )
{
Console.WriteLine("Successfully converted the EPUB to PDF !");
}
}
catch (Exception ex)
{
Console.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment