Don't Print DotNet PdfSharp

IvanBIvanB Posts: 14Member
Hello! Below C/AL code don't works. pls advice.
I added variable dotnet
PDFPrint DotNet PdfSharp.Pdf.Printing.PdfFilePrinter.'PdfSharp, Version=1.32.2608.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb'
run next C/AL code:
PDFPrint := PDFPrint.PdfFilePrinter;
PDFPrint.Print(100); ( if i don't set milliseconds, then Nav freezes)
nothing occurs

Best Answer


  • lubostlubost Posts: 486Member
    You didn't send any document to print. You should print some document.
  • IvanBIvanB Posts: 14Member
    I try as below, also don't works.
    PDFPrint := PDFPrint.PdfFilePrinter(MyFilePath, MyPrinterName);
  • IvanBIvanB Posts: 14Member
    Thx. I marked RunOnClinet. It's works! But now a new problem. Before sending the file to the printer application opens Acrobat. How to do it without opening app Acrobat?
  • Slawek_GuzekSlawek_Guzek Posts: 1,554Member
    edited 2017-12-06
    That's probably how it handles PDF printing - otherwise it would have to include the whole PDF interpreting/rendering engine on its own.

    Consult the PdfSharp documentation, or ask the vendor, maybe there are some switches/settings which will let you to run Acrobat in the backgrouibd hidding it from users
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Sign In or Register to comment.