Don't Print DotNet PdfSharp

IvanBIvanB Member Posts: 17
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.PdfFileName('C:\1\TestForm.pdf');
PDFPrint.PrinterName(PDFPrint.DefaultPrinterName);
PDFPrint.Print(100); ( if i don't set milliseconds, then Nav freezes)
nothing occurs

Best Answer

Answers

  • lubostlubost Member Posts: 611
    You didn't send any document to print. You should print some document.
  • IvanBIvanB Member Posts: 17
    I try as below, also don't works.
    PDFPrint := PDFPrint.PdfFilePrinter(MyFilePath, MyPrinterName);
    PDFPrint.Print(100);
  • IvanBIvanB Member Posts: 17
    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 Member Posts: 1,690
    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.