Hi everyone,
I'm generating an EPL file in one directory, and trying to print it, bit I finde the next error:
"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
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.
I've found a dll library inthe providers webpage, but i cannot open it into a dotnet variable:
"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
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.
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
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.
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:
How should I do it? I'm quite lost...
I've tried with this one:
And still having the same problem.... Don't find the "Print" option...
You must select a program which is able to handle EPL-files.
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:
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
Sohail Ahmed
2
mmv
2
Amol Salvi
2