HTML online minimizer/compressor? [closed] - html

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Does anyone know of a good online generator to take the source code of an HTML page and compress/minimize the entire page.
Meaning, compress/minimize all embedded CSS, JavaScript and obviously the HTML of that web page while also removing unneeded HTML/CSS/JavaScript comments, spaces, tabs, etc?

Juriy Zaytsev wrote an HTML minifier in JavaScript, which you can use online on this page: http://kangax.github.com/html-minifier/
As the warning says, it’s still an early alpha, so there might be bugs. Use with caution!

http://prettydiff.com/ - This is written in JavaScript so you can use it instantly in your browser.

There's an online compressor that does minimize all embedded CSS and JavaScript blocks and also the HTML. It produces a single line output code which renders as the original and respects the document structure.
It uses Yahoo YUI Compressor and Google Closure compiler for JavaScript.
Check it here: HTMLcompressor.com

This is the best minifier I found till date.
Check it here: Html, Javascript as well as CSS minifier

A duplicate of https://stackoverflow.com/questions/728260/html-minification ?
And if you do not really need an ON-Line tool, then PageSpeed plugin for Firefox and the Yahho compressor are both really good minifiers. Also the PageSpeed tool can give you hints what to change, and which change will give the biggest change in speed/size.

I came across a script that will minify your HTML, Inline CSS, Inline Javascript On The Fly.
Check here Dynamic Website Compressor

I recommend you to try WebMarkupMin Online.

These are the perfect minifiers:
For Javascript http://javascript-minifier.com/
For CSS http://cssminifier.com/
For PNG http://pngcrush.com/
For JPEG http://jpgoptimiser.com/

I use HTML JavaScript CSS Minifier for minify the entire HTML code (including CSS and Javascript).
You can also encrypt the Javascript parts on Javascript minifier encryptor to make it less readable but it increase the size of your file.

Related

customizing css in bootstrap [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
okay so I have just started development using twitter bootstrap. I find it very handy and easy to use. But when it comes to applying my own styles and adding my own background color, links color, button color and font colors It gets really frustrating. I therefore need some good and complete resources or any tutorial that explains how to add our own css in the existing bootstrap framework. Any help will be really appreciated!
if you want to customize the appearance of twitter bootstrap framework then:
always use a custom.css file to override the main bootstrap.css.
include it under your bootstrap.css
always see getting-started at bootstrap site.
see this site bootstrap-resources
hope this will help you
Fonts and colours can be customised on the bootstrap webpage. Adding backgrounds and things can be achieved by creating your own custom.css which can be included after the bootstrap.css file.
No offense, but - when you read a bit more carefully you're getting all the information you want on the project's page(s):
On the project page is a little tool where you can customize all LESS variables, at the GitHub repo is a README on how to compile the LESS files from scratch. Have a look at the LESS homepage to get a clue about what LESS actually is.
You only need to build a CSS selectors with higher specificity, than those defined in bootstrap's CSS. See nice explanation here: http://www.youtube.com/watch?v=In78mSOHmls
And you can use the built-in Firefox Page Inspector tool to see, which rules are applied and which are overriden. (it can be started by pressing the Ctrl+Shift+i shortcut, in Chrome it's Ctrl+Shift+j )
You can customize your resources on getbootstrap.com. I would recommend you read their component documentation so you can understand what is offered and align it with what you need, that way you can avoid a bloated stylesheet.
Also chrome has a great tool that allows you to edit CSS on the fly (which I find more useful and quicker than using Firefox's extensions)

How to use html for desktop publishing? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Not considering ad-hoc programs (like Adobe Indesign, the open source Scribus or word processors), it seems to me that Latex is the only markup language used for document preparation able to generate beautiful PDF documents.
I thought that HTML + CSS would make a terrific combination for the purpose. HTML can be easily generated from a mid-layer format (like markdown), a bit of programming based on classes can generate indexes and notes (and so on) and CSS can really style a page with ease. Preparing a document would turn out to be way easier than using Latex that is incredibly powerful but making something "out of the standard" is really hard.
The hard part would be getting the PDF. While there are a number of programs (also free)
to get a PDF out of HTML, I can't see how to retain the concept of "page". One would write the document as a single, long HTML page and let the program split it into pages, apply footnotes, headers, page numbers...
Is there already such a program? Has anyone any idea on how to implement it? Thanks.
Summary: Prince is the best option if you're serious about a high quality HTML-to-PDF pipeline. If you don't want to pay for Prince, you will probably need to compromise on either document quality or your choice of pipeline.
There is an excellent article on A List Apart about this. They used Prince and CSS2 paged media (as suggested by widyakumara) to produce pages with correctly-formatted numbers and the like. Prince is free for noncommercial use; commercial use licenses start at $3800 per server, which isn't so expensive when you consider how damn awesome Prince is.
A few cheaper alternatives were suggested in an earlier Stack Overflow question about converting HTML/CSS3 with generated content/paged media into PDF. I've tried a few of those, and I have to conclude that Prince is the only tool I've seen that can produce a paged PDF using features like generated page numbers from HTML and CSS. Prince also supports many print-specific features like footnotes.
That said, I'd suggest that this is a solution in search of a problem. HTML and CSS are proably not the best choice for documents that are intended to finish up as "beautiful PDF documents." LaTeX is not just a markup language; it is a mature, intelligent typesetting system whose goal is to produce attractive printed documents. In comparison, HTML and CSS are plainly not the best tools for the job.
there's css print media type & paged media section
Have you considered XSL-FO? Apache FOP is free and may suit your needs.

Dynamic HTML to PDF [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I need to be able to convert dynamic HTML (html that is rendered on page load by javascript) to a PDF. I know there are plenty of HTML to PDF converters but none of the ones I have found thus far cope with dynamic HTML.
The given tool should be able to successfully convert the following page - http://www.simile-widgets.org/timeline/
Cheers
Anthony
UPDATE:
I don't need the JavaScript functionality here... i.e. i don't need to be able to interact screen... I just want the finial rendering of the screen to be captured in the PDF - like taking a photo after the page is loaded. And in the example I provided the javascript is only rendering divs to the screen so its nothing that it shouldn't be able to handle as long as it "lets" the "page" render first.
There is no way it can be done. The interfaces available for scripts in PDF are extremely limited compared to the full DOM and BOM access you enjoy in a web browser. Such interaction as you can achieve in PDF is not readily translatable from how it works in a browser and would almost certainly need hand authoring.
Your example page has many effects that PDF, as an essentially static document layout format, simply cannot reproduce at all.
Edit:
I just want the finial rendering of the screen to be captured in the PDF
Ah, OK, that's a far easier and more common problem then.
In that case you'll have to use and automate a real web browser (like Firefox), or a toolkit that provides all the logic of a web browser (like WebKit), then either:
export to PDF, either using built-in tools like ‘Print to file’ in Firefox (with background images/colours turned on) or one of the PDF export add-ons, or
take a image snapsnot of the browser (and include the image in a PDF if you have to)
See these questions for some discussion of browser snapshotting.
The fact that it uses any JavaScript at all means a lot of converters won't work. The JavaScript may be simple, but you still need an interpreter to handle it.
I haven't used it for myself, but you might try wkhtmltopdf. It uses the webkit rendering engine, and I believe it includes full javascript support. You would need to be able to install the software and run the executable, but otherwise it should be fairly straightforward.
You could use a javascript URI to alert the current DOM. eg:
javascript:alert("<html>" + document.documentElement.innerHTML + "</html>")
Copy the HTML and save to a file.
Then run it through the HTML2PDF converter.
dynamic-html-pdf
This is best library for node js convert dynamic html to pdf.
https://www.npmjs.com/package/dynamic-html-pdf
You can probably use PhantomJS or headless chrome.
Try xhtml2pdf. Here's the project page at python.org.

Is there any kind of CSS library out there? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I was wondering if there are any kind of CSS libraries like a Yahoo CSS Library?
Basically I am looking for something akin to JQuery but for CSS instead of JavaScript.
There are CSS frameworks.
There's really not that much of a reason for a CSS library / framework (in one's opinion) as everything you'd be doing is specific to your application's style (Cascasing Style Sheets).
However, there is something I use alot (or the designers I work with), made by Eric Meyer called reset which is a nice tool (as it homongenizes the styles to be almost the same in all browsers), however it does force a rule upon every element on the page (which can slow stuff down sometimes). Here's the link - http://meyerweb.com/eric/tools/css/reset/
I guess you either mean CSS frameworks (I like blueprint) or something like Sass, which is supposed to make writing CSS easier.
I think Blueprint is the nearest you’ll get to a CSS library, outside of the YUI stuff.
There are also standalone grid systems that make laying out your page easier, e.g. 960.gs
Because CSS isn’t a programming language, there isn’t really much scope for abstracting out common tasks. It’s very difficult to really isolate one style from another.
What I have found useful is looking at the CSS in CSS frameworks like Blueprint, to see what they do, and how they do it. Then do a slimmed down version of that for whatever site I’m working on.
CSS is not executable code, so what do you want a library to do?
Using a CSS framework will only truly help if your mindset and needs align with those of the framework creator.
Personally, I think that something like SASS which allows you to generate whatever style of CSS you want, with nifty features such as variables for storing colors consistently, is the best thing to use for larger projects.
There are not really CSS frameworks. It's just a buzzword. A better name is "themes" or "look'n'feel".
jQuery has also several themes in its UI library and you can even roll your own.
To not reinvent the wheel, I would recommend the book Pro CSS and HTML Design Patterns.

Delphi - Is there a suitable WYSIWYG HTML Editor Component for VCL/FMX app? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I need a WYSIWYG editor Component that I can use in the Delphi application to create the body of the email in HTML.
We've used TRichView just recently to do HTML email functionality and found it quite adequate. We did evaluate WpTools and it does do exactly what we wanted however for our needs it was just too expensive especially when we always try and purchase site licences.
One thing we did find with WpTools is that it did implement a visual component or set of visual components that you could drop onto a form that implement the whole WYSIWYG UI (e.g. toolbars and such). It took a bit longer with TRichView to achieve the same thing.
Regarding conversion from/to html - TRichView can export html natively, however requires third-party libraries to import html which unfortunately (for us) are not commercially backed (i.e. community driven). So we've resorted to storing all content in RichText natively and only when sending the email do we convert it to html. WpTools has the ability to import/export to html natively.
I have been looking for this as well for several years now.
The best solution I found, until now, is WpTools from WpCubed. It's not an exact Html editor, but an advanced word processing component which offers a copy mode to and from html. I am currently working on using this component in my Sitestepper web creation software (in the StepEdit html-editor to offer wysiwyg possibility). I think that certainly for email editing this could be used (although maybe a bit pricy for what you are looking for). I know the author is working an a better exchange to and from html.
But to be honest, I don't think you will find anything if you need a Delphi component.
I used to use HtmlEdit from Purposesoft, but I think this product has got his limitations and it's not fully supported anymore. But maybe for your purpose it's ok.
I've used EmbeddedWB from bsalsa. Basically it is the same as Delphi's TWebBrowser, but you have access to more features of the IE automation object. In the browser I loaded an HTML which looks like:
<html>
<head>
<title>Edit description</title>
</head>
<body contenteditable="true">
</body>
</html>
Marking an element by IE specific attribute "contenteditable", the IE implementation let's you edit the element's inner HTML in a WYSIWYG manner. You can get the content by automation calls (check bsalsa.com to see how to read the edited content). If you get the basics it is pretty simple to create a full blown HTML editor.
Good luck!
My answer using Bsalsa Web Browser Components - very easy complete HTML editor/viewer.
delphi-how-do-i-make-a-basic-wysiwyg-html-editor-using-delphi
If using IE COM based components is not a problem then you can use this free product
http://bsalsa.com/product.html
I have just recently needed a free HTML WYSIWYG editor and I thinks this is the only thing out there. For me it works fine, but I don't need complicated elements. They can be done, but will a little more work.