iTextSharp-generated PDFs cause save dialog when closing

前端 未结 1 1776
春和景丽
春和景丽 2021-01-28 07:32

I am using iTextSharp to generate PDF documents, and save them to disk like this:

        Document document = new Document(PageSize.LETTER, 50, 50, 80, 50);
             


        
1条回答
  •  迷失自我
    2021-01-28 08:03

    Have you tried it without the FileAccess.ReadWrite, FileShare.ReadWrite properties?

    I create PDF's using itextSharp everyday and have never ran into this issue - main difference between your code and mine is i don't have these.

    I suspect the FileShare is leaving the document somewhat open, waiting for someone to finalise closing it with a save?

    0 讨论(0)
提交回复
热议问题