Doug Stewart on 22 Nov 2015 10:56:07 -0800
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Solved: Need to Convert HTML Page to jpg Image
- From: Doug Stewart <firstname.lastname@example.org>
- To: Philadelphia Linux User's Group Discussion List <email@example.com>
- Subject: Re: [PLUG] Solved: Need to Convert HTML Page to jpg Image
- Date: Sun, 22 Nov 2015 13:56:00 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:mime-version:subject :message-id:date:references:in-reply-to:to; bh=cMtihIiRhQ62Voh0U78zm4EVJBbUd8ufCsRDS7TKHqo=; b=gBXfS73RQSF249t5N6ErAu4ixLVv7DHDQMVg6SfphMnE3pQnqhS9OQZePtLFwcQGAk rnVBGCRGmDzMvjTry4Jd+LfVRpRhMUz58wveIac6NqE9aFsptm1pRr1JZLHpkh23mmrK 0sMrm1i6AAk0+wV1z1rK8FGqPe19ZwecPQgneE8w3Ro1cCr7rzwBzN+BWLkpl6x3l8dD 9wGDN/VnIvc2XU2blFXZ/doiwWfRpi50iAS7cbpHFV13D/ywCF/91apuSnDB2T7lUGVF fLW5CDYGFkLBa/3Wh5MoOWpfr1RW0uFOUOp5N3OekI2Nk5KISFRIKbOLx3hOVlE55doO MQ0A==
- Reply-to: Philadelphia Linux User's Group Discussion List <firstname.lastname@example.org>
- Sender: "plug" <email@example.com>
We've used PhantomJS for just this sort of an application in the past:
Well, as usual, another 15 minutes of searching found a solution. If "html2ps" is installed, imagemagick's "convert" can do this easily.Convert page.html page.jpgCaseyOn Sunday, November 22, 2015 12:29:20 PM Casey Bralla wrote:
Good questions, Steve.
I want a simple screen-shot of the first page. I'll shrink this down to
about 20% of full size and display it next to a pull-down list of uploaded
pages. This way the user will have both a saved name, and simple visual
image of the page they uploaded.
The user won't have to actually read the details of the page; he'll just be
able to recognize it so he can remember what is on it.
On Sunday, November 22, 2015 12:13:03 PM Steve Litt wrote:
On Sun, 22 Nov 2015 11:58:33 -0500
Casey Bralla <MailList@nerdworld.org> wrote:
I'm writing a web application where users will upload an HTML page
which will be shown on another page. I want to allow the user to
see a miniature image of the HTML file they uploaded.
Anybody know how to convert an HTML page into a jpg or png file?
I've seen online tools to do this, but I need to have my application
automatically convert them on the fly (ie: I need a cli program to
convert HTML into a png or jpg.)
I think you need to define your requirements more tightly. Do you want
the .png to include every single word of a 500K word web page? A sort
of 8.5" x 3000" .png? Or do you want the .png to be what the viewer sees
in the browser after the HTML file has been loaded but before any
scrolling or navigation has taken place? Do you need just the raw text,
or do you need the appearance and fonts too? Do you want the containing
browser to be part of the image (a screenshot, in other words)?
November 2015 featured book: Troubleshooting Techniques
of the Successful Technologist
Philadelphia Linux Users Group --
General Discussion --
-- Casey BrallaChief Nerd in ResidenceThe NerdWorld Organisationwww.NerdWorld.org___________________________________________________________________________Philadelphia Linux Users Group -- http://www.phillylinux.orgAnnouncements - http://lists.phillylinux.org/mailman/listinfo/plug-announceGeneral Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug