Missing fields in ZPL code after EXPORT from ZebraDesigner - zebra-printers

I created a layout using ZebraDesigner, it has fields and barcodes. I can only export to a .PRN file that contains "ZPL" code, but when I open the file, the fields are missing, I can only find the barcode's fields.
This is an example of what I am getting
As you see, there is a lot of strange code.
This is what I expected to see
The printer still prints all the fields, but the problem is that i need to see those fields in clear into the PRN file because in my program i parse the file template and replace all the fields, for example #idArticolo# with their corrispondent information picked from a database.
The strange thing is that in the .PRN file i see in clear only the barcode fields.
But normal text is not included.

The problem was the font, that was not compatible with the zebra editor.
I used one of the default zebra fonts of ZebraDesginer.

Related

How do I wrap data in BIRT?

I have developed a BIRT report and need to export the output as PDF and as an Excel Spreadsheet. I am looking a solution to wrap data in PDF report exported from BIRT. A text gets truncated in the PDF, if it does not have spaces as soon as it exceeds the available width of the column.
e.g. phone number getting truncated
I would like to know if there is a solution without the need for adding a custom code as provided in How to wrap column data in birt report. This solution adds whitespace to the data which is not desirable when the report is exported to an excel spreadsheet. In essence, this solution manipulates the data which isn't the right thing to do.
I have tried using the Whitespace auto option but that does not work.
I am using BIRT version 4.12.
I was able to figure out the solution for getting the text wrapped in the PDF export. Made use of IPDFRenderOption.PDF_WORDBREAK for the same.
PDFRenderOption pdfOptions = new PDFRenderOption();
pdfOptions.setOutputFileName("T:/temp/filename.pdf");
pdfOptions.setOutputFormat("pdf");
pdfOptions.setOption(IPDFRenderOption.PDF_WORDBREAK, true);
task.setRenderOption(pdfOptions);
task.run();

Node wont save if text field contains word "having"

When I try to save edited node Drupal just reset field values and do nothing without any error message or log.
I entered text word by word and found that word "having" cause such behavior.
I'm using ckeditor to edit and filter text value and I guess that this module source of problem. As if I save text as plain text there are no issues.
Right now I don't know what to do next to track, dig deeper and isolate this issue...
PS. In ckeditor format settings I checked only two options:
Limit allowed HTML tags and correct faulty HTML
Convert line breaks into HTML (i.e. br and p)

View tiddler with source code in pre block with syntax highlighting

I have a tiddler that contains SQL source code. I am embedding it into another tiddler using the $codeblock macro, and that works wonderfully.
When I view the source tiddler (the first one), I'd like to get it formatted like the embedded one (in a pre block with syntax highlighting applied).
I noticed Tiddlywiki can do this for Stylesheets, when you set a tiddler type to text/css. How can I do the same for other custom types? I've combed the docs but haven't found anything so far, but I freely admit I may be using the wrong terminology in my search. I've also struggled to find the source code that does the pre wrapping for stylesheet tags.
Anyone know how I'd do this?

unusual error occur in laravel validation

In my laravel 4 project i gave a validation like this
'contact_no' => 'numeric|digits_between:10,10',
But this shows error in a weird situation. If I copy and paste the phone number in the field it shows validation error "The contact no must be a number." But when I type the phone number everything is fine.
Did anyone knows why laravel shows this kind of error? and how I can resolve this?
The screen shot is:
If you copy a string from a source which is not plain text (but formated text) sometimes there are invisible spaces copied along with the string. I had this strange behavior several times.
How you test it
Open notepad (or any plain text editor)
Type your number
Copy it from there
Paste it in your form
I guess this number will work.
How you could try to go around this problem
Before validation trim the input data from contact_no to remove all whitespaces first. See http://php.net/manual/en/function.trim.php

Knockout set initial value of an input field where html is allowed

I have two input fields first name and last name.
Application was running really well.
Suddenly someone came in from Mars and input something like this in those input fields
*(~'##~>?<+!""*%$)!
for both first name and last name. Now don't ask me why he did this cause in Mars this is very common. You can try it on this fiddle
http://jsfiddle.net/farrukhsubhani/3RjRF/
This text then went into my database and now when i retrieve it it came back like this
*(~'##~>?<+!""*%$)
which is ok for me as its html and I can place it back into knockout and it gets populated as html as you can see in fiddle above. However this Mars guy then thought that on Earth this is not a nice name to be with so he tried to edit field.
The above fiddle is kind of that edit page which shows him old value at bottom and two fields at top. He does not know html so he thought we have changed his name in input fields however I need to know
When passing text to knockout to give initial value to an input field is it possible to tell it that consider this text as html so it renders properly in input field
The other way around is to send him to http://www.w3schools.com/tags/ref_entities.asp and tell him about reserved HTML characters. This info has been stored in database (using Entity Framework simple person.fname and person.lname both with attribute AllowHTML) so on my fiddle i have just placed it in two variables and you can see how actual text boxes are different than html below. If i dont bind using Knockout then actual text is shown in these boxes and user can edit <>' signs without any problem.
Anyone with a solution before he leaves our planet. This can change alien life on our planet.
Update
If i go into this field and paste (~'##~>?<+!""*%$)" binding works fine and you can copy this and paste it into fiddle to see that. However its not taking that value from Javascript variable to knockout expects it to be a string and html special characters are not shown properly in input field.
We have done another test without Knockout and this text does get rendered within the field when you try to edit it its fine.
We have updated JSfiddle to work without JQuery and its the same result if you store it in a js variable and give not value to input field
http://jsfiddle.net/farrukhsubhani/3RjRF/3/
If we assign value to input field and just use jQuery to populate fullname then it works
http://jsfiddle.net/farrukhsubhani/3RjRF/4/
This last fiddle is a working example and we want Knockout to do what JQuery is doing.
I think the question then comes to how can this text be stored in javascript variable and placed into input field as html text so special characters appear unescaped. You can try unescape on jsfiddle that did not work for us.
Somewhere along the trip into (or maybe out of) your database, the value is being HTML-escaped. It's not Knockout itself that's doing it. You're going to need to track that location down, but you can't just disable it; you're going to have to replace it with something that sanitizes the result or otherwise you're opening yourself up to cross-site scripting attacks (any <script>s from external sources inserted into the input would have complete access to your data).
Any time you see the html: binding used, warning bells should go off in your head and you should VERY carefully to check to ensure that there's NO possibility of raw, unexamined user input making it into the string that gets displayed.
Ok here is what i did at the end
http://jsfiddle.net/farrukhsubhani/3RjRF/7/
I have done following:
I have added value attribute to input field and placed the input text as it came from server into it. Because I am using TextBoxFor in MVC it did that for me.
Before I apply knockout binding I have picked this value up using $('#kfname') and passed it to the actual binding so it used the value that came from server. Previously it was passed like (#Model.fname,#Model.lname)
I think what this did was allowed jQuery to pick up the value and assign it to binding instead of variable
ko.applyBindings(new ViewModel($("#kfname").val(), $("#klname").val()));
Hopefully this would help someone using knockout.

Resources