-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Description
First time works fine, the second request nothing happens, no exceptions
public ActionResult BarcodePdf()
{
var document = new HtmlToPdfDocument
{
GlobalSettings =
{
ProduceOutline = true,
DocumentTitle = "Pretty Websites",
//PaperSize = PaperKind.A4,
Margins =
{
All = 1.375,
Unit = Unit.Centimeters
}
},
Objects = {
new ObjectSettings { HtmlText = "<h1>Pretty Websites</h1><p>This might take a bit to convert!</p>" }
}
};
IConverter converter =
new ThreadSafeConverter(
new RemotingToolset<PdfToolset>(
new WinAnyCPUEmbeddedDeployment(
new TempFolderDeployment())));
// convert document
byte[] result = converter.Convert(document);
//string image = BarcodePdf1("abc");
//string html = RenderRazorViewToString("BarcodePdf", image);
//byte[] pdfContent = new SimplePechkin(new GlobalConfig()).Convert(html);
return new FileContentResult(result, "application/pdf");
}
Metadata
Metadata
Assignees
Labels
No labels