![](/images/MasterShadowLeftTop.gif) |
|
Welcome to the Invelos forums. Please read the forum
rules before posting.
Read access to our public forums is open to everyone. To post messages, a free
registration is required.
If you have an Invelos account, sign in to post.
|
|
|
|
Invelos Forums->DVD Profiler: Layouts and Reports |
Page:
1 2 3 ...5 Previous Next
|
New HTML Section: Printing Dymo Labels |
|
|
|
Author |
Message |
Registered: March 18, 2007 | Reputation: ![Highest Rating](/images/Ratings/Small/4.png) | Posts: 6,449 |
| Posted: | | | | As a result of a request for me to build a plugin for Dymo label printers similar to the P-Touch Label Printer Plugin, I did some research and discovered that the Dymo SDK is so feature-rich, that no plugin is required. The Dymo SDK has support for printing labels from text files, Excel Spreadsheets, Javascript/VB/HTML, Excel/CSV/XML, MS Word, and also has interfaces for low-level programming (DLL and COM APIs).
So, I decided to build an HTML section, and it seems to work pretty well. In this first post, I will repeat a portion of a post I made over in the plugins thread, then offer a sample HTML section, and then invite others to submit questions and comments. Please also feel free to share your own scripts of any type to print on Dymo, in this thread. It doesn't have to be an HTML section. My script attempts to handle EAN13 and UPCA labels by selecting one of two ready-made templates. It could also be made to adjust to print box-set disc-ids, but as you know parent profile is not available in an HTML section yet. I'm sure that is coming in the future (if not, I will release a private plugin that makes it available along with other goodies).
How to use the Dymo Software (even without having a printer):
(1) In windows, go to Control Panel, printers and install a new printer (2) Choose the Dymo model 400 or turbo 400, or whatver printer you have. (3) If you don't have a printer, for "port" choose "print to file".
(If you have a CD that came with the printer, obviously use that insetad of my instructions).
(4) Go to the Dymo web site and download and install the Dymo SDK and the label editor. You will then be able to create, edit and preview Dymo labels from VB, Excel, MS Word, HTML, custom programs - anything. It is very powerful. (If you have a CD that came with your printer, the SDK may already be on it).
How to Get The Data from DVD Profiler
For Dymo label printing, you need to create a text data file, MS Word file, Excel CSV file, Excel XML file to use with a Visual Basic or JavaScript/HTML script.
- For XML, use DVD Pro XML Export - one or multiple labels - For CSV, use the CSV Export plugin - For JavaScript/HTML, use the DVD Pro HTML Sections (this is the script I am creating) - For VBScript or .BAT file scripting, uses DVDProfileLoop plugin (Later, I will make a script for this also)
(By the way, just for the record, you can print to any printer directly from the Reports Tool in DVD Profiler - with an awesome array of ways to select and sort. When the barcode image becomes available, it will be the preferred way to print labels). | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: March 18, 2007 | Reputation: ![Highest Rating](/images/Ratings/Small/4.png) | Posts: 6,449 |
| Posted: | | | | Here is my first try at a script. It intentially creates a label similar to the one Rander created for the P-Touch, since the user that commissioned this effort seemed to like that one. Here is the script. Cut and paste it into a new HTML section (replacing the default contents). Be sure to save it as HTML. Otherwise you will lose it if you ever restore your database or layout. Of course you have to modify the script to load your own template and adjust it to fill the data fields that you need. <HTML> <HEAD> <SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //--> </SCRIPT> <body> <h1>Dymo Label Printing</h1> <DP NAME="UPC"> <DP NAME="LOCALITY"> <form> <INPUT TYPE="BUTTON" NAME="PrintBtn" VALUE="Print Label" OnClick="PrintBtnClicked()"> </form> <SCRIPT Language="JavaScript"> function PrintBtnClicked() { var DymoAddIn, DymoLabel; var ret, upc; var dot = -1; DymoAddIn = new ActiveXObject('DYMO.DymoAddIn'); dot = DP_UPC.indexOf("."); if (dot > 0) { upc = DP_UPC.substring(0,dot-1); } else { upc = DP_UPC; } DymoLabel = new ActiveXObject('DYMO.DymoLabels'); ret = "false"; if (upc.length == 12) { ret = DymoAddIn.Open('C:\\Documents and Settings\\All Users\\Documents\\DYMO Label\\Label Files\\RanderCloneEAN13.LWL'); } else { ret = DymoAddIn.Open('C:\\Documents and Settings\\All Users\\Documents\\DYMO Label\\Label Files\\RanderCloneUPCA.LWL'); } if (ret) { if (DP_UPC != "") DymoLabel.SetField("UPC", upc) if (DP_CollectionNumber != "") DymoLabel.SetField("collection",DP_CollectionNumber) if (DP_Title != "") DymoLabel.SetField("title", DP_Title) if (DP_OriginalTitle != "") DymoLabel.SetField("original", DP_OriginalTitle) if (DP_Rating != "") DymoLabel.SetField("rating", DP_Rating) if (DP_Edition != "") DymoLabel.SetField("edition", DP_Edition) if (DP_Genres[0] != "") DymoLabel.SetField("genre1", DP_Genres[0]) DymoAddIn.Show(); } else alert('Error: Label file Not Found!'); } </SCRIPT> </body> </html>
And here is what happens when you view the section (docked window) and press the "print" button: ![](http://mysite.verizon.net/vze39sc9/sitebuildercontent/sitebuilderpictures/Dymo.jpg) (Oops, I misspelled www.mediadogg.com ![](/images/emoticons/embarrassed.gif) ) | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: March 14, 2007 | Posts: 3,830 |
| Posted: | | | | nice job. | | | Sources for one or more of the changes and/or additions were not submitted. Please include the sources for your changes in the contribution notes, especially for cast and crew additions. |
| Registered: March 18, 2007 | Reputation: ![Highest Rating](/images/Ratings/Small/4.png) | Posts: 6,449 |
| Posted: | | | | Some key points when tailoring the script and designing your labels: Each text item on the label has a "reference name" that defaults to TEXT, TEXT_1, TEXT_2, etc. You can change these names. If you look at the script, you can see that I changed the reference names to upc, rating, edition, etc. to make it easier for me to write the program. The barcode is created by the SDK based on the data that you put into a linked reference field. When you edit the barcode object, you can change "linked to" to be any text field. That's the field you put the DVD Pro data into. I called mine "upc". You have to check "Function as a Variable Text Object".
If you don't want that field to actually show up on the label, just set the text color to be the same as the label background (usually white), and it won't show. The barcode object can be set to display the UPC along with the barcode.
Then, for each field, you have to code a "SetField" command (see the script). If you you want to print immediately instead of getting the preview, change the "SHOW()" command to "PRINT" - see the SDK manual for the exact format.
Well, good luck! Don't forget to post your results and any improvement you made! | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: March 13, 2007 | Posts: 670 |
| Posted: | | | | | | | The future is here. It's just not widely distributed yet. (William Gibson) |
| Registered: May 27, 2007 | Posts: 691 |
| Posted: | | | | Thank you very very much. | | | Unfortunately, I can't use DVDprofiler at the moment due to lack of a Windows computer. |
| Registered: May 27, 2007 | Posts: 691 |
| Posted: | | | | Getting label file not found. Again, I must have done something stupid.
Yes... I'm being stupid. I need to get my hands on those labels the html looks for. | | | Unfortunately, I can't use DVDprofiler at the moment due to lack of a Windows computer. | | | Last edited: by EdwinK |
| Registered: March 18, 2007 | Reputation: ![Highest Rating](/images/Ratings/Small/4.png) | Posts: 6,449 |
| Posted: | | | | Quoting EdwinK: Quote: Getting label file not found. Again, I must have done something stupid. Well, you have to create a label first!! (Edit - oh, I see you figured that out!) Actually, I guess I could have sent you my samples. I'll send it to the email address that I have already - I assume that's ok. You will have to put the labels into the directory referred to in the script, or change the script. Once again, I hope you understand that going forward, you will need to make, possibly many, changes to the script. The script has to match the label exactly. If you haven't, start reading the SDK manual. You only need the High Level portion. Also, see the sample scripts that are installed with the SDK. That's where I started from. Edit: Ok, labels on the way! | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: May 27, 2007 | Posts: 691 |
| Posted: | | | | Yes. Okay. Thanks. I'm going to see if I can get this all to work now (or later tomorrow). Need to get the labels first. Now I'm using a different size of them, but that will be fixed tomorrow. Edit: It even works with my labels, without too much problems. Still, I'm going to get new labels tomorrow ![](/images/emoticons/wink.gif) (and of course the visit mediadog.com should be changed ![](/images/emoticons/wink.gif) ) | | | Unfortunately, I can't use DVDprofiler at the moment due to lack of a Windows computer. | | | Last edited: by EdwinK |
| Registered: May 27, 2007 | Posts: 691 |
| Posted: | | | | Okay, it isn't much, but I made a small html section myself. It print those nice little labels that you put on the center of your DVD/cd. Since I don't really know how it works with if then / else, I decided to keep it in, but let it point to the same label. I think other people can make better layouts then me, but ... this is my very first attempt to it. ![](http://i50.photobucket.com/albums/f329/edwin_kort/a570e11f.jpg) ![](http://i50.photobucket.com/albums/f329/edwin_kort/59d61a2f.jpg) <HTML> <HEAD> <SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //--> </SCRIPT> <body> <h1>Dymo DVD Label Printing</h1> <DP NAME="TITLE"> <DP NAME="LOCALITY"> <form> <INPUT TYPE="BUTTON" NAME="PrintBtn" VALUE="Print Label" OnClick="PrintBtnClicked()"> </form> <SCRIPT Language="JavaScript"> function PrintBtnClicked() { var DymoAddIn, DymoLabel; var ret, upc; var dot = -1; DymoAddIn = new ActiveXObject('DYMO.DymoAddIn'); dot = DP_UPC.indexOf("."); if (dot > 0) { upc = DP_UPC.substring(0,dot-1); } else { upc = DP_UPC; } DymoLabel = new ActiveXObject('DYMO.DymoLabels'); ret = "false"; if (upc.length == 12) { ret = DymoAddIn.Open('C:\\Documents and Settings\\Edwin\\Mijn Documenten\\DYMO Label\\Label Files\\DVDLabel.LWL'); } else { ret = DymoAddIn.Open('C:\\Documents and Settings\\Edwin\\Mijn Documenten\\DYMO Label\\Label Files\\DVDLabel.LWL'); } if (ret) { if (DP_CollectionNumber != "") DymoLabel.SetField("collection",DP_CollectionNumber) if (DP_Title != "") DymoLabel.SetField("title", DP_Title) DymoAddIn.Show(); } else alert('Error: Label file Not Found!'); } </SCRIPT> </body> </html> | | | Unfortunately, I can't use DVDprofiler at the moment due to lack of a Windows computer. | | | Last edited: by EdwinK |
| Registered: September 9, 2008 | Posts: 1 |
| Posted: | | | | Is there any solution available to print labels for all your DVD's in just one click, or do i have to print one-by-one? Dymo LabelWriter | | | Last edited: by pb300polar |
| Registered: May 27, 2007 | Posts: 691 |
| Posted: | | | | I believe you can do that with the CSV export plugin (download from the main site) and the import function of the Dymo software. HAven't tried it myself, I only need to print a label every now and then. | | | Unfortunately, I can't use DVDprofiler at the moment due to lack of a Windows computer. |
| Registered: May 27, 2007 | Posts: 71 |
| Posted: | | | | Hi,
I installed everything but when I click on print label the text appear. Error Label file not found.
What did I do wrong. Can anyone explain.
Thanks |
| Registered: May 27, 2007 | Posts: 691 |
| Posted: | | | | You need to add the labels somewherre the HTML can find it. For example: Quote: ret = DymoAddIn.Open('C:\\Documents and Settings\\Edwin\\Mijn Documenten\\DYMO Label\\Label Files\\DVDLabel.LWL'); } else { ret = DymoAddIn.Open('C:\\Documents and Settings\\Edwin\\Mijn Documenten\\DYMO Label\\Label Files\\DVDLabel.LWL'); I think you can find those in this topic somewhere. | | | Unfortunately, I can't use DVDprofiler at the moment due to lack of a Windows computer. |
| Registered: May 27, 2007 | Posts: 71 |
| Posted: | | | | I changed the place where the html can find it but still the same It is on E:\Mijn Documenten\DVD Profiler Labels\DVD LABEL.LWL. Which I put on the HTML section. The HTML now looks like this. { ret = DymoAddIn.Open('E:\Mijn Documenten\DVD Profiler Labels\DVD LABEL.LWL'); } else { ret = DymoAddIn.Open('E:\Mijn Documenten\DVD Profiler Labels\DVD LABEL.LWL'); } if (ret) { if (DP_CollectionNumber != "") DymoLabel.SetField("collection",DP_CollectionNumber) if (DP_Title != "") DymoLabel.SetField("title", DP_Title) Can you say what is wrong because I don't understand a word of what is been said here. Quoting EdwinK: Quote: You need to add the labels somewherre the HTML can find it.
For example:
Quote: ret = DymoAddIn.Open('C:\\Documents and Settings\\Edwin\\Mijn Documenten\\DYMO Label\\Label Files\\DVDLabel.LWL'); } else { ret = DymoAddIn.Open('C:\\Documents and Settings\\Edwin\\Mijn Documenten\\DYMO Label\\Label Files\\DVDLabel.LWL');
I think you can find those in this topic somewhere. |
| Registered: March 18, 2007 | Reputation: ![Highest Rating](/images/Ratings/Small/4.png) | Posts: 6,449 |
| Posted: | | | | nico,
You have to be careful to follow the scripting examples EXACTLY. There is a reason for the "\\" in the original paths instead if just "\". That looks like your main problem, assuming you didn't make other typing mistakes. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. |
|
|
Invelos Forums->DVD Profiler: Layouts and Reports |
Page:
1 2 3 ...5 Previous Next
|
|
|
|
|
|
|
|
![](/images/MasterShadowRightTop.gif) |