Expand my Community achievements bar.

html to pdf


Level 1

I am trying to use the adobe html to pdf library and try to create a pdf file from html page using dot net core.


the issue I am facing while using the  library I am able to generate the pdf but the html file still in open state.

Credentials credentials = Credentials.ServicePrincipalCredentialsBuilder()

//Create an ExecutionContext using credentials and create a new operation instance.
Adobe.PDFServicesSDK.ExecutionContext executionContext = Adobe.PDFServicesSDK.ExecutionContext.Create(credentials);
CreatePDFOperation htmlToPDFOperation = CreatePDFOperation.CreateNew();

// Set operation input from a source file.
FileRef source = FileRef.CreateFromLocalFile(filePath);


// Provide any custom configuration options for the operation.

// Execute the operation.
FileRef result = htmlToPDFOperation.Execute(executionContext);

string webRootPath = _webHostEnvironment.WebRootPath;
string folderPath = Path.Combine(webRootPath, "PDFFiles");
if (!Directory.Exists(folderPath))
string output = Path.Combine(folderPath, pdfName);


how to end the process after pdf creation in adobe libraries

0 Replies