Can't Get Print To File To Work Follow

0
Avatar
Legacy Poster

I'm playing around with the .net sdk and have ran into a issue of not being able to create the PrintFile.prn data that I could use to send the data to the btRuntime.SendDataToPrinter() command.

Has anyone had any success with this?

What my end goal is to take what is done with the WPS and integrate it into my label process to make it one seemless site rather than the current way of redirecting to the WPS.

18 comments

0
Avatar
Shotaro Ito
Moderator
Comment actions Permalink

I'm sure you've already done that - however, make sure .net Print SDK sample "Print To File Manager" works properly on your environment.
0
Avatar
Legacy Poster
Comment actions Permalink

[quote name='Shotaro I -Seagull Support' timestamp='1335918667' post='2335']
I'm sure you've already done that - however, make sure .net Print SDK sample "Print To File Manager" works properly on your environment.
[/quote]

How do I verify it's working properly? Everything seems to. Irk right up to that point.
0
Avatar
Shotaro Ito
Moderator
Comment actions Permalink

[quote name='1tufgt' timestamp='1335921029' post='2337']
How do I verify it's working properly? Everything seems to. Irk right up to that point.
[/quote]
Once you've installed .net SDK via custom install, you can run the sample from
BarTender (version) > BarTender.net SDKs > Print SDK Samples > Print to File Manager.

Step1:
Select printer to print, then [Generate] to generate Print License.

Step2:
Open a Label format, select the same printer model as above printer, then [Print to File] to export encrypted print code.
(event in this button )

Step3:
Send encrypted print code to printer, by [Print] button.

Make sure the print has performed properly at step3.

The source code can be seen from
C:\Program Files\Seagull\BarTender Suite\SDK\Print SDK Samples\PrintToFileManager\
0
Avatar
Legacy Poster
Comment actions Permalink

I'm running bartender 9.3 and I don't remember if I saw that SDK included.
0
Avatar
Shotaro Ito
Moderator
Comment actions Permalink

[quote name='1tufgt' timestamp='1335924494' post='2340']
I'm running bartender 9.3 and I don't remember if I saw that SDK included.
[/quote]
.net SDK can be installed from Custom install, which can be enabled from Control Panel > Add remove programs > BarTender 9.3 > Modify.
See this white paper for some info:
[url="http://s3.amazonaws.com/SeagullBarTender/ftp/WhitePapers/WhitePaper_BarTenders.NET_SDKs_English.pdf"]White Paper: BarTender’s .NET SDKs[/url]

Note that Print to file property is available only on Enterprise Automation Edition.
0
Avatar
Legacy Poster
Comment actions Permalink

Ok, looks like the issue is that it can't find the licensing server. We are running on a different port than what the default is set as.

Is there a way to change the port it's looking at in the SDK?
0
Avatar
Shotaro Ito
Moderator
Comment actions Permalink

[quote name='1tufgt' timestamp='1335970728' post='2347']
Is there a way to change the port it's looking at in the SDK?
[/quote]

Sure - LicenseConnection.Port property does that. Below is code from .net SDK Documentation, Print SDK > LicenseConnection class.

[code]public void Demo()
{
// Initialize a new BarTender print engine.
using (Engine btEngine = new Engine())
{
// Start the BarTender print engine.
btEngine.Start();

// Retrieve the preferred license connection.
LicenseConnection connection = btEngine.LicenseServer.PreferredConnection;

// Change the port of the license connection.
connection.Port = 8881;

// Check if the engine is connected to license server.
if (btEngine.LicenseServer.Connect())
Console.WriteLine("Connected BarTender engine to a License Server");
else
Console.WriteLine("Failed to connect BarTender engine to a License Server");

// Stop the BarTender print engine.
btEngine.Stop();
}
}
[/code]
0
Avatar
Legacy Poster
Comment actions Permalink

Yeah I found that out but is there a way to change it in the demo?

Also is it possible to use print to file for printing over the Internet?
0
Avatar
Shotaro Ito
Moderator
Comment actions Permalink

[quote name='1tufgt' timestamp='1336356578' post='2359']
Yeah I found that out but is there a way to change it in the demo?

Also is it possible to use print to file for printing over the Internet?
[/quote]

Do you mean "Demo (Trial)" edition? then No, You need an Activated License server to test these function.

Print to file for printing over internet is demonstrated in WebLabelPrint Sample in Print Server SDK Samples folder.
C:\Program Files\Seagull\BarTender Suite\SDK\Print Server SDK Samples\WebLabelPrint

Some descriptions can be found in SDK Documentation, searched by "Web Label Printing" and "Web Label Print Sample".
0
Avatar
Legacy Poster
Comment actions Permalink

No don't mean demo. We have ver. 9.3 enterprise. I'm referring to the sample programs is there a way to change the port on them since my lines server is not running on the default port.
0
Avatar
Shotaro Ito
Moderator
Comment actions Permalink

The sample code above shows change current port no. to 8881. Did you have any error when you tried?
0
Avatar
Legacy Poster
Comment actions Permalink

Haven't had a chance to try but will this morning.
0
Avatar
Legacy Poster
Comment actions Permalink

Ok after looking at what you wrote, my question is how do I use the "connection" class in the sample SDK that came with the software. Say I'm using the FileToPrint SDK, where would I need to make the change in the code to include the conneciton.port?

When I open the SDK folder I have the Bin, C# & VB folder, so if I wanted to add that piece in which folder would I look into to modify?
0
Avatar
Shotaro Ito
Moderator
Comment actions Permalink

In the SDK folder's VB or C# folder, you would find Visual studio project file (*.csproj or *.vbproj).
Open the project file by Visual studio and you would find Windows form class (PrintToFileManager.cs etc.)
In form events of the code, you can find some codes about running Engine.

Besides please consider to set this port setting from BarTender UI (Administer > Licensing setup), rather than from .net SDK - this setting isn't something you would switch often after installation.
0
Avatar
Legacy Poster
Comment actions Permalink

[quote name='Shotaro I -Seagull Support' timestamp='1336439085' post='2368']
In the SDK folder's VB or C# folder, you would find Visual studio project file (*.csproj or *.vbproj).
Open the project file by Visual studio and you would find Windows form class (PrintToFileManager.cs etc.)
In form events of the code, you can find some codes about running Engine.

Besides please consider to set this port setting from BarTender UI (Administer > Licensing setup), rather than from .net SDK - this setting isn't something you would switch often after installation.
[/quote]
Ok that seemed to work with setting the port via the Bartender UI.

Another quick question is there a project solution for the "WebLabelPrint" in the SDK? When I opne hte folder I don't see a project solution like with the other SDK samples.

Thanks
0
Avatar
Shotaro Ito
Moderator
Comment actions Permalink

[s]You can open the sample project From Visual studio or Visual Web developer - File > Open Web site > From File system, you can open C# or VB folder to open the web site.
[/s]---

Sorry It wasn't right. Please follow "Web Label Print Sample Application" part of .net SDK Documentation to install WebLabelPrint

Basically you need to copy source codes to WebLabelPrint folder in IIS public folder (wwwroot etc).

Note that sample folder contains both [C#] and [VB] Folder - so what you would do is,
in wwwroot folder create a folder "WebLabelPrint", copy all files and folders of either VB or C# folder to the created WebLabelPrint folder.
After copied, follow the documentation to configure web application.

Once you have setup web application, you can open that from Visual Studio / Visual Web Developer, From the File menu, select Open and click Web Site.

If you have compile error of "Seagull.BarTender.Print" not found, add "Seagull.BarTender.Print" to project reference.
0
Avatar
Legacy Poster
Comment actions Permalink

3127 Unable to print. The PrintToFileLicense property must be set to a valid license prior to printing. why did i get this error i am new to bartender

0
Avatar
Legacy Poster
Comment actions Permalink

Hi,

 

I have a problem getting the PrintToFileSample from the .NET SDK to work. 

 

Every time I trie to print to a file I get the following error:

 

"3126 For calling the automation is the enterprise automation edition required" (It might not be the correct error description my application is installed in Dutch language, but the errorcode will be correct)

If I trie this from within the bartender application everything works fine and a file is generated.

 

How can I get the PrintToFileSample form the SDK to work?

 

Thanks!

Please sign in to leave a comment.