Skip to content

First time works fine, second request nothing happen #190

@manishvadher

Description

@manishvadher

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions