javascript library to convert web page to pdf [closed] - pdf-generation

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 4 years ago.
Improve this question
Is there any client-side library that can convert a web page to a PDF document? I have used jspdf but the generated pdf does not retain the formatted html (like tags should be boldface in the PDF).

Very simple if your page is not having any sensitive data
Just Do this:
Save this page to a PDF
OR
Download this tool.
And you can invoke it on any event like:
<script>
function generatePDF(){}
var conv = new ActiveXObject("pdfServMachine.converter");
conv.convert("http://www.google.com", "c:\\google.pdf", false);
WScript.Echo("finished conversion");
}
</script>
<body onload="generatePDF()">
</body>
var conv = new ActiveXObject("pdfServMachine.converter");
conv.convert("http://www.google.com", "c:\\google.pdf", false);
WScript.Echo("finished conversion");
OR
For more information
http://snapshotmedia.co.uk/blog/jspdf
http://itextpdf.com/
http://github.com/MrRio/jsPDF

Related

How to obtain href anchor texts ​from a div class using XPath [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
With XPath I want to filter out all anchor texts (a href) "click here", which are in a special div class "main-content" included. I am not a developer and hope for support, thank you.
If I understand your query correctly you want to get all 'click here' links present in div with main-content class.
Based on Link Text
//div[contains(#class,'main-content')]//a[.='click here']
Based on attribute:
//div[contains(#class,'main-content')]//a[#href='url goes here']

Index container sample component [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I would like to implement a feed component that has multiple of:-
an icon
a label
The component could be backed by an IndexedContainer.
It would be helpful if the sample showed how to update the feed component when a new item is saved / or inputted the data source.
If you don't need any lazy loading, you could get some inspiration from a still-to-be-published add-on that I've put together: https://github.com/Legioth/Listing/blob/master/listing/src/main/java/org/vaadin/listing/Listing.java
If you want to use the class as it stands, you might also be interested in this usage example: https://github.com/Legioth/Listing/blob/master/listing-demo/src/main/java/org/vaadin/listing/demo/Demo.java#L37
If you need lazy loading, I'd suggest trying to get Table or Grid to work according to your requirements.

Add image source link on the Image [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to add an hyperlink on the image :
here is the example : http://aff248.teensdigest.com/articles/766?page=1
I want to use few images on my website with that i want to show the image source.
So how can we add a link of image source on the image itself. I tried with the css but i don't know how to put the link exactly on the image.
Your sample web site is using CSS to overlay the image with an href for "Source" like this:
Source
And in one of the CSS stylesheets, they define the class citation. Check out the second stylesheet in your sample.

How to do grouping of items in winjs list view [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to do grouping of. List view items in winjs .can any one suggest me
You can check out my codeShow app that includes a super simple example in the ListViews demo. The app is at http://aka.ms/codeshowapp and the full source code is at http://codeshow.codeplex.com.
If you have your basic data in a WinJS.Binding.List, call that list object's createGrouped method, which returns a now-grouped projection. You then use that projection's dataSource property as the itemDataSource for the ListView. You can also use that projection's groups.dataSource property as a groupDataSource for the ListView's groups.
See How to group items in a ListView for details.

Image id as digit causes W3C error [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I am using Drupal 7.9 and the images generate a numerical id automatically. It causes W3C validation error value of attribute "id" invalid: "1" cannot start a name because id attribute doesn't allow a digit as its name. The image tag is
<img id="1" class="media-image" alt="contact" src="path to image" typeof="foaf:Image">.
How can I get rid of this? Any help will be greatly appreciated.
Update. As #SvartalF said, how can I prefix string to id in Drupal? I tried jQuery for that. But didn't help. This problem exists only with images uploaded via wyswyg CK editor
HTML id value must begin with a letter, you can check it here.
So, you can prepend id with a some-prefix like a image-, or use HTML5 data-* attributes

Resources