baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
- From: sindi keesan <keesan AT sdf.lonestar.org>
- To: lforrestster AT gmail.com, baslinux AT lists.ibiblio.org
- Subject: Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 17
- Date: Mon, 22 Jan 2007 20:06:53 +0000 (UTC)
On Mon, 22 Jan 2007, Lee Forrest wrote:
On Mon, Jan 22, 2007 at 06:40:33AM +0000, sindi keesan wrote:
On Sun, 21 Jan 2007, Lee Forrest wrote:
htmldoc is available as open source 3.2MB tar.bz2 download. It can
[delete]
The dependencies for Slackware 4.0 ghostscript are the two svgalib
libraries:
libvga.so.1
370K
Big library.
libvgagl.so.1
58K
I don't have those anywhere on BL.
You also don't have a video chip that supports svgalib.
(which I just packaged together with the newzgv from BL1 and uploaded to
http://keesan.freeshell.org/bl/zgv-bl3.tgz)
That's good.
Only if you can use svgalib. Otherwise add some other viewer such as xv which will view more formats than xli does (such as pbm).
gs will also work under X, and you can specify X as the default, in /etc/profile, export GS_DEVICE=x11 (?). GS for SW4.0 and 7.1 use 'vgalib' as the default device.
It might be possible to compile gs not to require these two libraries.
libc.so.5
570K
libm.so.5
32K
Got those. Seem to be standard.
Almost nothing but busybox or other uclibc-compiled things will work without them in BL3.
Slackware 4.0 gs was compiled not to require X, and uses svgalib to
display files instead. gs itself is 1.3MB, there are another 863k of
files in one directory and documentation. And you probably need more than
the basic font selection that I packaged for use with the xpdf CLI
programs because I don't have it displaying anything with fonts yet, tho I
made a symlink to /usr/share/ghostscript/5.10/fonts from
/usr/local/share... (where xpdf programs were looking for the fonts).
It displayed a scanned image file and zeroline.ps.
Could be that xpdf wants fonts that encoded differently than gs.
No, it uses glibc X not libc5 X. I had the same problem trying to use a glibc gs, would not even see the older libraries, which it required.
ps2pdf may be working but I cannot view the output with gs (or any other
pdf file) yet.
It was not working, could not find enough fonts.
gs seems far smaller or at least simpler than HTMLDOC-cum-dependencies and
should be adequate to print the output of Abiword, either as user with
printcap and lpr, or as root after producing a ps file with Abiword and
then using the gs-based pstopdf|pdftoppm|pbmtolj > /dev/lp0 (pdftoppm -
xpdf, pbmtolj - netbbm)
Looks like they may be about the same size, but htmldoc is _way_ simple
to use:
htmldoc -f foo.pdf foo.html --webpage
That's it. And you have pdf doc from a webpage. The pdf doc could
be many pages long, if the webpage was long. It has lots of other
options, but they are easy to understand. You can make a whole book
from webpages, ready for the printer and bindery, in a jiff.
Sounds good, but large and time-consuming to gather all the libraries and then also compile it, and it needs kernel 2.4.
Opera can apparently make a ps file from a webpage, also printable.
Or gs can convert it to pdf. Can opera convert html to ps CLI?
A bash script that would convert _simple_ webpages into ps wouldn't be that
hard, I _think_. PS is all text (pretty sure), so images must be converted
to ascii.
Ron might be interested. I have now conquered 'user' and will progress to lpr as root. Learned a lot on the way.
It's just another markup language like html/tex/groff...One thatExpensive printers.
printers understand. (I hope I'm right about that last.)
I just made a PS3 doc from a simple webpage (htmldoc) with a few
short paragraphs and one image. Total html file length 1K. Image
62K jpeg.
The vast majority of the 807K PS3 doc is the image converted into
ascii, like mimencode or uuencode, but vastly less efficient.
The same image mimencoded is 83K.
pdf compresses images. PS prints faster but takes up more space.
I don't know what kind of ascii-encoded-image that is, but a
utility that converted images into that format would be needed
for the script. If nothing else, it could be pulled out of the
htmldoc code, but that shouldn't be necessary.
(The same webpage converted to PDF is 457K. But it's binary.)
That is also a lot less efficient. People keep scanning images on their 'pdf machines' which make pdfs out of them, instead of just making unwrapped images. 200K per page instead of 50K. pdfimages unwraps the images to ppm form and you can then turn them into small gifs. The pdf is the default for some scanner program, unfortunately.
I'm talking about a script that deals with webpages that could be
printed just as they are displayed on the screen, one page of ps
per screenful of processed html. What you see is what you get. It
will _all_ print. And could easily be written manually. HTML1 or
2.
You could make tasteful books/magazines/newspapers with it.
Personally I prefer plain text, which is why I print webpages that way.
Writing such a script for _all_ webpages would be a formidable
task, and that's the least of the reasons I have no interest in
such a project.
(A script to convert modern-dreadful HTML to basic HTML would be
great. A filter to run every webpage throught _before_ it got
to your browser.
Might slow things down on a slow computer.
Here are a couple of interesting PS links:
http://www.linuxjournal.com/article/2386
http://www.adobe.com/cfusion/search/index.cfm?loc=en_us&term=postscript+language
Docs are not a problem, but you need a PDF viewer to display them! :-)
To avoid dependencies you can convert online:
pdf to html or text:
Google converts pdf to html or text for you (but very poor quality text).
Adobe does free online conversion of pdf to html (for people with disabilities).
http:// www.pdfonline.com Upload a document you want converted from html to pdf.
Other formats to pdf:
http://www.k2pdf.com/convert.html converts just about everything except html to pdf, free online: rtf txt WORD Excel Powerpoint ps gif jpg png tif zip..... Upload your file to their site. Works with Opera 8.52.
If you don't give them your email address they only do .doc .xls .ppt .txt and .rtf.
It took about 30 sec to upload and convert 1 line of text, which I can retrieve from their URL within 24 hours.
No dependencies but upload and download required.
I could not find any CLI linux program that converted ppt to anything so someone teaching a course I audited printed it for me.
Gmail converts various formats to HTML including ppt, xls, doc, pdf, and rtf.
Xpdf's pdftops or gs's pdf2ps for ps from pdf.
Writing basic PS by hand would not be practical. But writing
basic HTML by hand, _is_. It would be possible to write an
interactive script that called basic PS formatting functions,
but we all know and use basic HTML anyway.
What basic functions are you thinking of?
I am told HTML needs css to do hard page breaks.
Any such script is now at the bottom of a list of projects I need
to tackle in order. First up is getting an Xserver that will get
good images out of my i810 chip.
Am working on building 3.3.6 on my uclibc OS. Has an i810 server
with all the functionality _I_ need.
What progress?
Instead of trading libc5 for libc6, I plan on trading libc5 for
uclibc (Which is half the size of libc5 but does everything I
need (keep your fingers crossed) that libc6 offers. I built ppp
(pppd,chat...) and setserial on it today, and it already has most
of what the stock BL3 has, including busybox.
Are you compiling dynamically against uclibc? I think Steven was considering that eventually, maybe after more bugs are worked out.
When I get everything I have on BL3 on uclibc, I'll move the libs
and executables over to BL3. They both use the same kernel.
Hopefully it will be less than 20M without a compiled-apps
development environment.
[delete]
Lee
--
BasicLinux: Small is Beautiful
http://www.basiclinux.com.ru
-----------------------
BasicLinux mailing list
-----------------------
http://www.basiclinux.com.ru
http://www.ibiblio.org/pub/linux/distributions/baslinux/
------------------------------------
To exit, send subject=unsubscribe to
baslinux-request AT lists.ibiblio.org
keesan AT sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
-
Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 14
, (continued)
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 14, sindi keesan, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 18, Lee Forrest, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 18, sindi keesan, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 14, sindi keesan, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 14, 3aoo-cvfd, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 14, sindi keesan, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 17, Lee Forrest, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 17, 3aoo-cvfd, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 1A, Lee Forrest, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 1A, 3aoo-cvfd, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 17, sindi keesan, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 14, James Miller, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 14, sindi keesan, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 14, 3aoo-cvfd, 01/22/2007
- Re: [BL] HTML to PDF/PS (was: BL3 as 'user') 14, sindi keesan, 01/22/2007
- Re: [BL] BL3 as 'user' 12, Ron Clarke, 01/21/2007
Archive powered by MHonArc 2.6.24.