Datatable processing slow - datatable

I have a large chunk of data populating in datatables on the page. Which is freezing the browser.
I found a solution for this using meta tag name "SKYPE_TOOLBAR", which has solved the problem. I want to know....
How does this helps fasten the process of large data in Data tables? Is it safe to use it in the project?
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />

Related

How do I insert content after new page (automatically generated) or forced page break with dompdf using Twig?

I have created a PDF template that consists simply on a table with a header and multiple rows using Twig to create a PDF through dompdf library.
My problem is that I'm required to insert always another content, specifically a table, after each page with the purpose of having this another table always on the back page when doing duplex printing (in other words, at the end there should be an even number of pages, with the odd ones corresponding to the first table and the even ones corresponding to the inserted table). Do you know if there is a way to achieve this using dompfd or another PDF generation library compatible with Symfony/Twig?
Update: After thinking about other approaches to solve the problem, finally I discovered a library named php-pdftk, that allowed me to create the PDF that I wanted by separating each table into separated PDF's (with dompdf) and then merging both files with the function named "shuffle" (from pdftk), that inserts one page of the first PDF and then one page of the second PDF and so on.
Dompdf can handle the CSS property page-break-*:
.page_break {
page-break-after:always;
}
<h1>Page 1</h1>
...
...
<div class="page_break"></div>
<h1>Page 2</h1>
...
...

Rotativa Issue printing RAW HTML

(More specific Giorgio Bozio)
I have been using Rotativa for the last year to print simple html to pdf and its been working fantastic. Very happy with product, but now recently i have been trying to do something a little more advance and i keep having the same issue.
Normally i would send Rotativa a simple invoice view (Predefined HTML) with model data populated via Razor and this worked well, but now i am trying to implement template's for my invoices. Customers can create their own template layouts with a custom 3rd party form designer and then upload its template file into my site. I take this file and parse it and generate the elements of the invoice with stringbuilder and div tags. I then send the generated HTML to the view that uses a #HTML.Raw() to populate the invoice html. Rotativa then takes this View and generates a pdf, but when it generates the pdf its quality of the text is horrible and blurry. Thus it generates the template correctly, but does some sort of shrinking or something to make the text not look crisp.
I have tried everything, from playing with custom switches to playing with the dimensions of the html.
When i copy the generated html to a view and just generate the pdf plainly then it prints fine, but as soon as i push the html to the view with HTML.Raw i seem to land up with fussy text.
Giorgio Bozio, does Rotativa have a issue with Html.Raw? or can you perhaps open a dialog with me to try and resolve this issue? Really hope you can help me...or someone can help me. Desperate and dont really want to change Rotativa for something else.
Please help.
Resolved Text printing issue by removing background-color definitions on Div containers.
Resolved extra blank page printing issue by reducing PageHeight on Rotativa Customswitches
:-)

How to use Slickgrid to render XML data?

We are using JQuery and JQuery UI and looking to rewrite a xml to dom table into a datastore based grid. In ExtJs, I can use Ext.data.reader.Xml along with a data Modal to map the returned data to the grid. I am trying to do the same, but using a JQuery based grid library. Performance and theming also need to be considered.
I have used JqGrid in the past, it has the xmlmap option. But, I am looking at SlickGrid, specially for its performance capabilities. I could not see any XML driven examples. I suspect if I go with Slickgrid I will have to load the xml and loop through it to build the the data object.
Do anyone have suggestions for using Slickgrid to show XML data. Specifically, does it have xmlmap or xml reader features? Would SlickGrid give significant performance improvement over JqGrid for say 1000 rows?
Example of XML:
<D:prop>
<FileExtension>.s4d</FileExtension>
<ComponentType>DynamicTrove</ComponentType>
<getcontenttype>application/xml</getcontenttype>
<ComponentCreatedOn>2011-03-17 12:57:57 </ComponentCreatedOn>
</D:prop>
<D:prop>
<FileExtension>.s4d2</FileExtension>
<ComponentType>DynamicTrove2</ComponentType>
<getcontenttype>application/xml2</getcontenttype>
<ComponentCreatedOn>2011-03-17 12:57:57 2</ComponentCreatedOn>
</D:prop>
Thank you.
Example of
You can display such XML data in a grid. I recommend you to include local searching and filtering which could be very practical for the user if the user have to analyse 1000 rows of data. If you would use paging with filtering you will get very good performance for 1000 rows. I don't recommend you to display all 1000 rows at once. Paging is much better.
The main problem could be XML namespaces because it could be parsed in different ways with respect of jQuery. See the answer for short description of the problem.
The demo is an example which can be your starting point. Another demo uses XML namespaces and work correct in IE, but it works incorrect in Google Chrome.

Displaying image and pass dynamic data to pyrocms page

i need to display an image on a page which i developed from content/pages. But i dont know how i can display image and pass dynamic data to this page.
Well! after waiting for people to answer i did some research and found that this work is done through tags and involves the use of partials.

Insert metadata Viewport without being able to modify HTML

I'm gonna visualize on a WebView an external HTML page.. that I cannot modify.
Is there the possibility to insert in the HTML code "viewport" metadata before loading the request on the web view? I'd like to scale the page correctly in the UiWebview.
Thank you all.
I did not quite clearly understood your question..but guess you are trying to append meta viewport tag without modifying the actual html...if yes, you can do it using external Javascript...
document.getElementsByTagName('head')[0].appendChild( ... );
Make DOM element like so:
MetaVa=document.createElement('meta');
Metava.name='viewport';
MetaVa.content='......';
document.getElementsByTagName('head')[0].appendChild(MetaVa);

Resources