Ptburn sdk



Yüklə 1,07 Mb.
səhifə6/9
tarix07.11.2018
ölçüsü1,07 Mb.
#78595
1   2   3   4   5   6   7   8   9

4.11Generate Preview


This command generates an image preview of a Surething File. You must specify the path of the surething file, the path you want the image file to be placed, and the DPI of the image.
Message=GENERATE_PREVIEW

PathFrom = Path of the source SureThing .std file (Required)

PathTo = Path to the destination image file (Required). .JPG, .BMP, or .PNG image files allowed.

DPI = 50 - 600 (Default Value = 72)



4.12Run Utility Command


The run utility command is used to run any .exe file on the server. You are required to provide the command line of the exe you want to run.
Message=RUN_UTILITY

PathFrom = Path that the utility to run is at (Required)



4.13USB Connect


This command is used to simulate a new USB Disc publisher being connected. This is mainly used for testing and demonstration. The PTBurn service will automatically detect this when running.
Message = USB_CONNECT

4.14USB Disconnect


This command is used to simulate a robot being disconnected. This is mainly used for testing and demonstration. The PTBurn service will automatically detect this when running.
Message=USB_DISCONNECT

RobotName = Robot that was disconnected (Required)



4.15Set/Clear Kiosk Mode


** This command is only valid on the Disc Publisher II, XR, PRO, XRP, Xi, 4100 **

This command is used to put or remove the robot from kiosk mode. Kiosk mode uses both bins as inputs and outputs all discs down the front slide. The current Kiosk mode state of all robots is stored in the "KioskModeEnabled" key, which resides in the Robot section of the SystemStatus file. (See Section 2.1.36 to see the behavior of BinID which tells the robot which bin to pick from and where to output the disc).


This message has the following structure:
Message= CHANGE_KIOSK_MODE

Value=X


ClientID=Administrator

RobotName=zzzz

where the value of X will either Set or Clear Kiosk Mode.

1 = Set Kiosk Mode

0 = Clear Kiosk Mode

ClientID should be set to Administrator

RobotName zzzz specifies which printer/robot to set/clear (e.g. Disc Publisher SE). If RobotName is not specified it will set/clear kiosk mode for the first robot found.

4.16Clean Cartridges


This command is used to clean/purge the cartridges.
Message = CLEAN_CARTRIDGES

5Coding Best Practices

5.1Programming Tips

5.1.1Reading the Status File


The status file should NOT be opened in a locked state. To ensure this you should either open the file with FileShare set to FileShare.ReadWrite or use GetPrivateProfileString (and/or GetPrivateProfileInt).
C# example:

FileStream fs = File.Open(“C:\PTBurnJobs\Status\Disc Publisher Pro Xi.txt”,

FileMode.Open, FileAccess.Read, FileShare.ReadWrite);

5.1.2Determining if the service is Running.


To determine if the service is running you can use the ServiceController class in .NET. Otherwise if you read the status file and the ServerTime and ServerTickCount are NOT incrementing then you know the service is NOT running.

5.1.3Starting the service


We advise that when you application starts it should ensure the service is running and if not your application should start the service. This can be done easily with .NET using the ServiceController class.

5.2Merge Printing

More information regarding merge printing can be found in Section 2.1.40.

This is another example of creating a SureThing .STD document template for replaceable text & photos.
Below are the steps used to create the file MySureThingFile.STD and its associated Merge text file called MyMerge.CSV (these files are located in the \Client\SureThingMergeSample\ folder):
1. Create a comma-delimited text file with a title/name for each replaceable item. You can use any word processing application or Excel. Be sure to save the text file in a text format (not in a proprietary word processing format). Save with Unicode encoding if you have 2-byte characters or you can use ANSI encoding if there are not any 2-byte characters.

In this example, the names/titles of the replaceable items are: MyText, MyPic1, MyPic2, MyPic3. Then, add the actual text and photo names you want to be inserted into the .STD document at print time. In this example, I wanted it to say "Joe's Photos", and I wanted three images to be inserted: Pic1.jpg, Pic2.jpg, and Pic3.jpg. Save this file. (Note that you can modify the Merge file just before print time to allow you to replace the text & photos with anything you want, or you can use the MergeField key in your JRQ to let PTBurn replace the text). The file extension does not have to be .csv; it could be something else like .txt.


2. Open Surething and start a new design. You can add any static information at this time -- for example, text, pictures, and backgrounds that do not change from disc to disc.
3. Click on Insert/Set Merge File. Browse and select the file you created in step 1.
4. Set up the print date to be automatically set at print time:

Click on Insert/Insert Merge Field. Then click the Special Fields tab. Then choose Print Date from the Field Type.


5. Set up the replaceable text field:

Click on Insert/Insert Merge Field. You should see the titles created in step 1. Choose any of the replaceable text values -- MyText in this example (we are only creating one replaceable text item in this example).


6. Set up the replaceable Photos:

Click on Tools/Object Tools/Picture Tool. Marquis a rectangle (you can change size/position later) and then check the Merge: checkbox.

You will see a list of Field Names with the titles that you created in step 1. Choose the image you want: MyPic1 in this example.

Repeat this for MyPic2 and MyPic3.


7. Click on the Preview... button in the upper-right corner of SureThing. You should see the correct text and photos.
8. Save the .STD file. This can be a "template" for you to use. Unique data can be printed using step 9.
9. Now each time you want create a unique disc you should overwrite the text value for MyText --- so, you would overwrite "Joe's Photos" with "Amy's Photos" for example.

Also, you would overwrite the three .JPG files with new .JPG files -- they could still have the same names if you want: Pic1.jpg, Pic2.jpg, and Pic3.jpg. In this case, you would not need to modify these values in the Merge file. However, if you did want to use new photos with alternate names (PicX.jpg, PicY.jpg, and PicZ.jpg for example) then you need to modify the Merge file to call out these new filenames. Again, you can have PTBurn do the work for you by specifying MergeField keys in the .JRQ as described in Section 2.1.40.


NOTE:

One issue with SureThing is that it will always try to use the Merge file from its original location -- if you copy the .STD file and the Merge file to a new folder, then the .STD file will still try to use the Merge file from the original location -- if it can find the original Merge file then it will use it instead of the new one. If you don't want this to happen then you must delete or move the original Merge file (or copying files to a server machine without the original path works also). When specifying a merge picture within a Merge file, it is a good idea to NOT put in the path information -- just put the .STD file, Merge file, and the images in the same folder.





Yüklə 1,07 Mb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8   9




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə