HTML to PDF Node not working - flowgear

This is the error I get:
"Could not get the metafile from HTML string. Could not initialize the html converter object.Request failed.."
It also takes very long to process, always more than 20 seconds.
The HTML code is below:
<html><div class="row">
<div class="col-md-2">
<label>
GST/HST number
</label>
</div>
<div class="col-md-10">
some #
</div></div><div class="row"><div class="col-md-2">
<label>
Business name
</label>
</div>
<div class="col-md-10">
some company
</div></div><div class="row"><div class="col-md-2">
<label>
Transaction date
</label>
</div>
<div class="col-md-10">
some date
</div></div><div class="row"><div class="col-md-2">
<label>
Result
</label>
</div>
<div class="col-md-10">
GST/HST number registered on this transaction date.
</div>

Took a look at this, if you add html and body tags and make sure that the rest of the HTML is valid (there's an unclosed div as well), this works.
That Node does require you to use a DropPoint as well though.

Related

angular 5, Keeping value on inputs and adding it to JS object

I am making a web tool in angular 5 to help in the creation of new XML.
I am having trouble passing around the values of inputs and keeping them in the same input at the same time.
I Have a form with an event of ngSubmit that uses as a paremeter the reference of an ngForm
<form class="form-group" (ngSubmit)="createSimpleTypeList(f)" #f="ngForm" >
<div class="container">
<div class="row">
<div class="col-sm-12" >
<button class="btn btn-danger flex ">Construir Json!</button>
</div>
</div>
</div>
<hr>
<div class="container" *ngFor="let type of objSimpleType;let i =index">
<hr>
<div class="row">
<div class="col-sm-3">
<input type="text" [(ngModel)]="type.name" name="nameType"/>
<br>
Inserte el nombre del tipo:
</div>
<div class="col-sm-3">
<input type="text" [(ngModel)]="type.type" name="type"/>
<br>
Inserte el tipo:
</div>
<div class="col-sm-2">
<input type="number" [(ngModel)]="type.min" name="min"/>
<br>
Inserte minimo:
</div>
<div class="col-sm-2">
<input type="number" [(ngModel)]="type.max" name="max"/>
<br>
Inserte maximo:
</div>
<div class="col-sm-2">
<input type="checkbox" name="number" /> Numero?
</div>
</div>
</div>
<hr>
</form>
This is the createSimpleTypeList method
console.log(form.value.nameType);
this.objSimpleType.push({
'-name': form.value.nameType,
'xsd:restriction': {
'-base': form.value.type,
'xsd:minLength': {
'-value': form.value.min
},
'xsd:maxLenght': {
'-value': form.value.max
}
}
});
this.typeList.emit(form.value.nameType);
this.sharedNameSpace.emit(this.namespace);
The problem I am having is that I have not found a way to push new items into objSimpleType, without erasing the value of inputs, and if I manage to not erase the value of the inputs then the values of the form wont push.
this is how it looks.how the inputs work right now
This is what I need
How the inputs should be
I am still new to angular, and I would really appreciate the help.
Now that I have looked found the solution, I had two mistakes in the code above.
First my logic was not well executed, I needed to work with unique IDs,and call them dynamically.
Second, I was having trouble to call them , and after reading a lot, I found that I can call the parameters of a Json with brackets[].
"form.value['nameType' + this.i]" --Something like this is what i Needed.

bootstrap 4 validation icons repeat all through the input width with prestshop 1.7

I'm creating a prestashop 1.7.2.1 module. Prestashop comes with bootstrap 4 support.
I'm trying to use the from validation example from https://v4-alpha.getbootstrap.com/components/forms/#validation with the following code:
<div class="container">
<form>
<div class="form-group row has-success">
<label for="inputHorizontalSuccess" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control form-control-success" id="inputHorizontalSuccess" placeholder="name#example.com">
<div class="form-control-feedback">Success! You've done it.</div>
<small class="form-text text-muted">Example help text that remains unchanged.</small>
</div>
</div>
<div class="form-group row has-warning">
<label for="inputHorizontalWarning" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control form-control-warning" id="inputHorizontalWarning" placeholder="name#example.com">
<div class="form-control-feedback">Shucks, check the formatting of that and try again.</div>
<small class="form-text text-muted">Example help text that remains unchanged.</small>
</div>
</div>
<div class="form-group row has-danger">
<label for="inputHorizontalDnger" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control form-control-danger" id="inputHorizontalDnger" placeholder="name#example.com">
<div class="form-control-feedback">Sorry, that username's taken. Try another?</div>
<small class="form-text text-muted">Example help text that remains unchanged.</small>
</div>
</div>
</form>
</div>
using Pingendo 4 (bootstrap 4 desktop app editor) it works properly.
but when I add this code to my prestashop module all the inputs contains the validation icons repeated all through the input's width.
any ideas ?
PrestaShop's bootstrap CSS for these icons is being overriden by PrestaShop's own CSS.
When disabling the background property, it works fine.
You can modify the CSS and change background property to background-color.

I am not able to click radiobuttons using Robot Framework.(and selenium2Library)

Could anyone help me out please?
Actually, the radiobuttons are always in the DOM but they are visible on the page based on ADDRESS field, so as you can see below if Pickup and Delivery timezone are same then the radiobuttons are not visible on page:
but if they(pickup and delivery timezone) are different then the RADIO BUTTONS are visible as shown below:
.
Now in my script I try to set all the radiobuttons as NO, so when I run it the script passes but in real the radiobuttons are left untouched. The result is PASS as shown below
and Chrome browser after the script run is shown below:
Here is the script I wrote for waiting and clicking on radiobuttons:
`wait until element is enabled id=exportclearance_1
page should contain radio button id=exportclearance_1
click element id=exportclearance_1
click element id=transitclearance_1
click element id=importclearance_1
click element id=insurance_1`
Here is the HTML of page:
`<div class="form-group">
<label class="col-sm-4 control-label" for="">
<div class="col-sm-6">
<input id="exportclearance_0" name="export_clearance" value="True" autocomplete="off" type="radio"/>
<label class="control-label control-label-light clearance" for="exportclearance_0">Yes</label>
<input id="exportclearance_1" name="export_clearance" value="False" autocomplete="off" type="radio"/>
<label class="control-label control-label-light clearance" for="exportclearance_1">No</label>
<br/>
</div>
</div>
<div id="exportclearance-textarea" style="display:none">
<div class="row col-sm-6 col-sm-offset-4">
<textarea id="field-exportclearance" class="form-control customs-field" cols="40" name="export_clearance_instructions" placeholder="Instructions for export clearance (E.g. Broker details, Customs number, etc.)" rows="2"/>
</div>
</div>
<div class="form-group">
<div id="transitclearance-textarea" style="display:none">
<div class="form-group">
<div id="importclearance-textarea" style="display:none">
</div>
<div class="form-group">
<div id="id_attachment_formset_parent">
<div class="form-group">
<di
`
JavaScript executor worked for me as given below.
execute javascript document.getElementById('insurance_1').click()

Bootstrap3 horizontal forms with rows or inline forms

I'd like to accomplish a horizontal form with rows of multiple left aligned form controls per row. The final layout should look like this
First of all I want the icon show up NEXT to the name of the user on the right side of the user's name just like in the image showed above.
I use GWT along with bootstrap3.3.2. I read a lot about mix of horizontal forms
with inline forms or using horizontal forms along with rows of form controls. The last approach I like most.
I prepared a bootply which shows my first problem (I'll create a second bootply and stackoverflow post for additional problems). http://www.bootply.com/hheckner/GiPzaqWHlT
As you can see there, the icon does not align well (vertically) to the name of the user. Furthermore I'd like to show up the icon NEXT to the user's name, so if the user name is longer the image should move to the right and vice versa. Using the grid does not help here (I think at least). The icon should show up immediately next to the user name?
How can I accomplish this?
To get icon showing next to some text you just need to have span right after text, but still inside your <p> element.
I made somewhat similar form to the one you provided in screenshot using only Bootstrap Grid. There are probably multiple solutions, that could be better in terms of lines of code, but when you get used to grid system this should be quite fast method.
I have to warn you I used <h4></h4> for all text, and no special element for some text, so you should fix it accordingly. Also Bootstrap's form-inline class works only when viewport is bigger then 768px - you might not see working example on JSFiddle as you would want, but when you see it on screen bigger then 768px, it should be just fine.
<div style="text-align:left;">
<div class="container-fluid">
<div class="row">
<div class="col-md-4">
<h4>Owner</h4>
</div>
<div class="col-md-8">
<h4>Hannes Heckner <span class="glyphicon glyphicon-pencil"></span></h4>
</div>
</div>
<form class="form-inline">
<div class="row">
<div class="col-md-4">
<h4>Scheduled for</h4>
</div>
<div class="col-md-8">
<div class="row">
<div class="col-md-1">
<h4>Begin:</h4>
</div>
<div class="col-md-11">
<div class="form-group">
<input type="text" class="form-control" id="beginDate" placeholder="11/10/2015">
</div>
<div class="form-group">
<input type="text" class="form-control" id="beginTime" placeholder="10:30">
</div>
(Duration: <div class="form-group">
<input type="text" class="form-control" id="beginTime" placeholder="30">
</div> min)
</div>
</div>
<div class="row">
<div class="col-md-1">
<h4>End:</h4>
</div>
<div class="col-md-11">
<div class="form-group">
<input type="text" class="form-control" id="endDate" placeholder="11/10/2015">
</div>
<div class="form-group">
<input type="text" class="form-control" id="endTime" placeholder="11:30">
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<h4>Location</h4>
</div>
<div class="col-md-8">
<div class="form-group">
<input type="text" class="form-control" id="location">
</div>
</div>
</div>
</form>
</div>
</div>
JSFiddle https://jsfiddle.net/dejanmarolt/5ctd4fe5/

Bootstrap 3 in line form or input group

I am trying to create a search form, something like below..
http://tinypic.com/r/2py0scy/8
I am new to front end development and confused if an in-line form or a input group should be used?
The issue with inline forms is I am unable to size the input box (width) so any pointer there would also be really helpful.
Thanks!
Code Update
from home.HTML
<form class="form-inline" role="form">
<input class="form-control input-lg" type="text" placeholder="Discover">
<button type="button" class="btn btn-danger btn-lg">Go</button>
</form>
from the layouts - application.html.erb
<div class="container">
<%= yield %>
</div>
To play with the width in Bootstrap, see the grid system and the use the columns:
For instance, if you want a form on the right and the width at the 50% of the container, you can do:
<div class="container">
<div class="row">
<div class="col-xs-12 col-md-6">
This is div on the left
</div>
<div class="col-xs-12 col-md-6">
<form class="form-inline" role="form">
<input class="form-control input-lg" type="text" placeholder="Discover">
<button type="button" class="btn btn-danger btn-lg">Go</button>
</form>
</div>
</div>
</div>
The previous code, is designed to change the behavior on small devices.
You can use both depending on what you're trying to accomplish. Bootstrap is well-documented, did you read their documentation regarding forms ? http://getbootstrap.com/css/#forms
By default input items are 100% width in bootstrap (e.g. they fill the containing element they are in). For instance:
<input type="text" class="form-control" placeholder="Text input">
would result in a 100% width input field and
<style>
.smallwidth {max-width: 200px;}
</style>
<div class='smallwidth'><input type="text" class="form-control" placeholder="Text input"></div>
would result in a 200px width input field, because it is restricted by the outer div I put around it.