Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Problem when Printing a EPL file

(0) ShareShare
ReportReport
Posted on by 225

Hi everyone,

I'm generating an EPL file in one directory, and trying to print it, bit I finde the next error:

inglersd.png

"There os no associated application with the specified file for this operation"

The file is generated correctly, with this code:

   lShipment.CALCFIELDS(EPL);
   lTmpBLob.Blob := lShipment.EPL;
   lTempServerFileName := lFileManagement.ServerTempFileName('.EPL');
   lFileManagement.BLOBExportToServerFile(lTmpBLob,lTempServerFileName);
   FileNameServer := '\\SRV-DC01\navision\XML\Pegatinas\'+lShipment."No."+'.EPL'; 
   lFileManagement.DownloadToFile(lTempServerFileName,  FileNameServer);


And I'm trying to print it this way:

   IF ISNULL(ProcessStartInfo) THEN
     ProcessStartInfo := ProcessStartInfo.ProcessStartInfo;
   ProcessStartInfo.UseShellExecute := TRUE;
   ProcessStartInfo.Verb := 'Print';
   ProcessStartInfo.WindowStyle := ProcessWindowStyle.Hidden;
   //seleccionar impresora
   ProcessStartInfo.Arguments :='Etiquetas Expediciones 2';
   ProcessStartInfo.FileName := FileNameServer;
   Process.Start(ProcessStartInfo);
   Process.Close;

This are the involved variables
ProcessStartInfo    DotNet    System.Diagnostics.ProcessStartInfo.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'    
ProcessWindowStyle    DotNet    System.Diagnostics.ProcessWindowStyle.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'    
Process    DotNet    System.Diagnostics.Process.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'   

What could be the problem? I'm trying different options, but I can't finde the correct way,

Any hint will be really appreciated

*This post is locked for comments

  • Hannes Holst Profile Picture
    5,767 on at
    RE: Problem when Printing a EPL file

    You must sign the DLL or try to give it a strongname.

    Only did it once briefly. I think there are some examples available through google. Someone else might have more information.

  • jgaztanaga Profile Picture
    225 on at
    RE: Problem when Printing a EPL file

    I've found a dll library inthe providers webpage, but i cannot open it into a dotnet variable:

    null.png

    "Cannot load the library....."

    Seems tha the token is empty. How can I solve this? I've copies the dll in the addins folder...

    Tknak you again

  • Hannes Holst Profile Picture
    5,767 on at
    RE: Problem when Printing a EPL file

    I assume EPL is for a barcode printer.

    Have a look for the documentation of your printer model to find out how to send EPL-files to the printer directly.

    Never did it that way, but I think they provide normally small command line tools or a .NET-integration to communicate with the printer directly.

  • jgaztanaga Profile Picture
    225 on at
    RE: Problem when Printing a EPL file

    Thanks Hannes, At first, the development was in PDF, but we need to change it becasue system provider's requirements. I understand perfectly what you're saying, but..

    Which application can dothat? I've tried with 2 different ones, but seems not to be the correct ones...

    Realy appreciated your tips

  • Hannes Holst Profile Picture
    5,767 on at
    RE: Problem when Printing a EPL file

    You need an application which is able to open and print EPL-files.

    It's the same for PDF: You need an application to open and print pdf-files.

    If this is not possible, you must consider to generate another file type than EPL.

  • jgaztanaga Profile Picture
    225 on at
    RE: Problem when Printing a EPL file

    Hi Hannes Holst,

    May be could be an issue with the drivers?

    Thank you

  • jgaztanaga Profile Picture
    225 on at
    RE: Problem when Printing a EPL file

    I'm trying to first print the epl file from commnad line yo see if it's correct, but I'm not able to do it. I'm trying like this:

    NET USE  192.168.2.185_6: "\Etiquetas Expediciones 2"  /persistent:yes 
    PRINT /D:192.168.2.185_6 C:\XML\ENVIALIA\Pegatinas\ENV18-000059.epl

    or

    COPY  /B C:\XML\ENVIALIA\Pegatinas\ENV18-000059.epl 'Etiquetas expediciones 2'


    But I'm not able. Ther printer is configured in the server like this:

    printer.png

    How should I do it? I'm quite lost...

  • jgaztanaga Profile Picture
    225 on at
    RE: Problem when Printing a EPL file

    I've tried with this one:

    www.freefileviewer.com

    And still having the same problem.... Don't find the "Print" option...

  • Hannes Holst Profile Picture
    5,767 on at
    RE: Problem when Printing a EPL file

    You must select a program which is able to handle EPL-files.

  • jgaztanaga Profile Picture
    225 on at
    RE: Problem when Printing a EPL file

    Hi Hannes, thanks for your tip.

    What type off aplication should I USe as default one?

    As you say about the right click, I've noticed that if I right click the EPL file, I don't have the print option. I understand that this issue will be solved adding the default app, am I right?

    edit:

    I've configured Notepad++ as the default app:

    defaut.png

    But I still have the same problem, and still don't having the "Print" button when i right-click on the file.

    Should I restart the server?

    Than you, really appreciate your help

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics NAV (Archived)

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2

#1
mmv Profile Picture

mmv 2

#1
Amol Salvi Profile Picture

Amol Salvi 2

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans