Don't Print DotNet PdfSharp

IvanBIvanB Posts: 10Member
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 Posts: 416Member
    You didn't send any document to print. You should print some document.
  • IvanBIvanB Posts: 10Member
    I try as below, also don't works.
    PDFPrint := PDFPrint.PdfFilePrinter(MyFilePath, MyPrinterName);
    PDFPrint.Print(100);
  • IvanBIvanB Posts: 10Member
    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: 962Member
    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
Sign In or Register to comment.