Printing HTML file via lpr: page, not code!

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Printing HTML file via lpr: page, not code!

Dotan Cohen
When printing an HTML document via lpr I am getting that the HTML code
is being printed, not the rendered page. How can I get the rendered
page to be printed? The file is in fact named with an .html extension.
Thanks.

--
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü
--
kubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Printing HTML file via lpr: page, not code!

Matthew Flaschen
Dotan Cohen wrote:
> When printing an HTML document via lpr I am getting that the HTML code
> is being printed, not the rendered page. How can I get the rendered
> page to be printed? The file is in fact named with an .html extension.
> Thanks.

Use a2ps.

Matthew Flaschen

--
kubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Printing HTML file via lpr: page, not code!

Dotan Cohen
2008/12/23 Matthew Flaschen <[hidden email]>:
> Dotan Cohen wrote:
>> When printing an HTML document via lpr I am getting that the HTML code
>> is being printed, not the rendered page. How can I get the rendered
>> page to be printed? The file is in fact named with an .html extension.
>> Thanks.
>
> Use a2ps.
>

Thanks, Matthew. a2ps seems to call html2ps internally, which cannot
handle the unicode in the document. That is, unless I am doing it
wrong:

$ html2ps calendar.html > calendar.ps
Returns a page with the incorrect encoding (UTF-8 as iso-8859-1).

$ html2ps -e utf8 calendar.html > calendar.ps
Returns a blank page.

I have also tried utf-8 UTF8 and UTF-8 but they all return blank pages.

--
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü
--
kubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Printing HTML file via lpr: page, not code!

Matthew Flaschen
Dotan Cohen wrote:
> Thanks, Matthew. a2ps seems to call html2ps internally, which cannot
> handle the unicode in the document. That is, unless I am doing it
> wrong:

Yeah, you seem to be right.  That's even documented in the man page
("Currently recognized values are ISO-8859-1, EUC-JP, SHIFT-JIS, and
ISO-2022-JP (other EUC-xx encodings may also work).")  If it actually
uses characters outside of ISO-8859-1, I don't have a solution.  Take a
look at iconv, though.

> $ html2ps calendar.html > calendar.ps
> Returns a page with the incorrect encoding (UTF-8 as iso-8859-1).

What exactly do you mean?  It misinterprets UTF-8 input as ISO-8859-1 input?

Matt Flaschen

--
kubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Printing HTML file via lpr: page, not code!

Bruce Marshall
In reply to this post by Dotan Cohen
On Tuesday 23 December 2008, Dotan Cohen wrote:
> Thanks, Matthew. a2ps seems to call html2ps internally, which cannot
> handle the unicode in the document. That is, unless I am doing it
> wrong:

What's wrong with printing it from a browser??

--
kubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Printing HTML file via lpr: page, not code!

Dotan Cohen
In reply to this post by Matthew Flaschen
2008/12/23 Matthew Flaschen <[hidden email]>:

> Dotan Cohen wrote:
>> Thanks, Matthew. a2ps seems to call html2ps internally, which cannot
>> handle the unicode in the document. That is, unless I am doing it
>> wrong:
>
> Yeah, you seem to be right.  That's even documented in the man page
> ("Currently recognized values are ISO-8859-1, EUC-JP, SHIFT-JIS, and
> ISO-2022-JP (other EUC-xx encodings may also work).")  If it actually
> uses characters outside of ISO-8859-1, I don't have a solution.  Take a
> look at iconv, though.
>
>> $ html2ps calendar.html > calendar.ps
>> Returns a page with the incorrect encoding (UTF-8 as iso-8859-1).
>
> What exactly do you mean?  It misinterprets UTF-8 input as ISO-8859-1 input?
>

I get gibberish like the eighth example on this page:
http://gibberish.co.il/encoding.html
(warning: not English!)

--
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü
--
kubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Printing HTML file via lpr: page, not code!

Matthew Flaschen
In reply to this post by Bruce Marshall
Bruce Marshall wrote:
> On Tuesday 23 December 2008, Dotan Cohen wrote:
>> Thanks, Matthew. a2ps seems to call html2ps internally, which cannot
>> handle the unicode in the document. That is, unless I am doing it
>> wrong:
>
> What's wrong with printing it from a browser??

My guess he is generating the HTML file from a script.

Matthew Flaschen

--
kubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Printing HTML file via lpr: page, not code!

Dotan Cohen
2008/12/23 Matthew Flaschen <[hidden email]>:
>> What's wrong with printing it from a browser??
>
> My guess he is generating the HTML file from a script.
>

Correct, from konsolekalendar and then mutilated for my own needs.

--
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü
--
kubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Printing HTML file via lpr: page, not code!

Donn-11
On Tuesday, 23 December 2008 23:42:40 Dotan Cohen wrote:
> Correct, from konsolekalendar and then mutilated for my own needs.
>
I found a potential way via Firefox...
http://torisugari.googlepages.com/commandlineprint2

Perhaps konqueror has some tricks too?
\d

--
kubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Printing HTML file via lpr: page, not code!

Dotan Cohen
2008/12/25 Donn <[hidden email]>:
> On Tuesday, 23 December 2008 23:42:40 Dotan Cohen wrote:
>> Correct, from konsolekalendar and then mutilated for my own needs.
>>
> I found a potential way via Firefox...
> http://torisugari.googlepages.com/commandlineprint2
>
> Perhaps konqueror has some tricks too?
> \d
>

Thanks, that's great! I installed it in a spare Firefox profile and it
works nicely. I had just discovered gnome-web-print which also does a
good job. Thanks!

--
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü
--
kubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users