View previous topic :: View next topic |
Author |
Message |
Hyp Apprentice
Joined: 14 Feb 2004 Posts: 192
|
Posted: Tue Oct 19, 2004 3:24 pm Post subject: Per Shell in einen .PS-File drucken |
|
|
Hi,
wie kann ich eine html-Datei in eine Ps-Datei per Shell drucken ?
Im Firefox gibt es unter "Print" die schöne Option "Print to File", dann gibt man eine Datei an und die gesamte Html-Seite wird in diese Datei "gedruckt".
Dies funktioniert wunderbar. Jetzt würde ich den selben Vorgang gerne per Shell starten.
Wie lautet da der Befehl ?
Gruß
Hyp |
|
Back to top |
|
|
Deever Veteran
Joined: 06 Jul 2002 Posts: 1354 Location: Zürich / Switzerland
|
Posted: Tue Oct 19, 2004 3:31 pm Post subject: |
|
|
Mit app-text/htmldoc lassen sich aus HTML-Seiten PDFs erstellen, die du dann wiederum mit pdf2ps konvertiern kannst. pdf2ps "lebt" in app-text/ghostscript.
HTH!
/dev
PS: Und stell bitte das Geplenke ab, es ist sinnfrei. |
|
Back to top |
|
|
Hyp Apprentice
Joined: 14 Feb 2004 Posts: 192
|
Posted: Tue Oct 19, 2004 5:16 pm Post subject: |
|
|
Hi,
Danke für die Antwort.
Dein Vorschlag klappt teilweise. Beispielsweise diese Homepage wird nicht korrekt dargestellt, mit der Google-Seite klappt's wunderbar.
Es muss doch einen Befehl geben, der genau dasselbe wie der Firefox-Print Befehl bewirkt (weil damit klapt es so wie es soll).
Gruß
Hyp
EDIT: Vielleicht so etwas wie
Code: | lpr -pPrintToPs-File http://www.whatever.com --outfile page.ps |
Gibt es nicht etwas in der Richtung ? |
|
Back to top |
|
|
Hyp Apprentice
Joined: 14 Feb 2004 Posts: 192
|
Posted: Wed Oct 20, 2004 9:30 pm Post subject: |
|
|
Ich habe jetzt festgestellt, dass man mit
Code: | a2ps -Ppdf http://www.google.de |
Die Seite in ein PDF Dokument drucken kann.
Wie heisst der Postscript Drucker ?
Und wie kann ich die Einstellungen, die Firefox automatisch beim Drucken hat, übernehmen (ich mein, irgendwo müssen die ja stehen...)
Danke,
Gruß
Hyp |
|
Back to top |
|
|
toskala Advocate
Joined: 14 Dec 2002 Posts: 2080 Location: hamburg, germany
|
Posted: Thu Oct 21, 2004 7:58 am Post subject: |
|
|
willst du die seiten rein textbasiert haben oder mit bunten bildern?
lynx -dump www.google.de ist da evtl. nützlich _________________ adopt an unanswered post
erst denken, dann posten |
|
Back to top |
|
|
Hyp Apprentice
Joined: 14 Feb 2004 Posts: 192
|
Posted: Thu Oct 21, 2004 10:54 am Post subject: |
|
|
toskala wrote: | willst du die seiten rein textbasiert haben oder mit bunten bildern?
lynx -dump www.google.de ist da evtl. nützlich |
Ich hätte es gern so wie es der Firefox ausgibt, wenn ich "File--> Print to Ps" auswähle. Die Darstellung finde ich sehr gut gelungen.
Also mit schönen bunten Bildern
Gruß
Hyp |
|
Back to top |
|
|
toskala Advocate
Joined: 14 Dec 2002 Posts: 2080 Location: hamburg, germany
|
Posted: Thu Oct 21, 2004 11:08 am Post subject: |
|
|
hmm, ich muss nur grade mal die sinnfrage stellen, wieso dann nicht firefox benutzen?
also ich denke der weg müsste über wget -> html2ps sein. _________________ adopt an unanswered post
erst denken, dann posten |
|
Back to top |
|
|
Hyp Apprentice
Joined: 14 Feb 2004 Posts: 192
|
Posted: Thu Oct 21, 2004 11:50 am Post subject: |
|
|
Hi,
Wget wäre ja okay, wenn es funktionieren würde.
Bei der Seite die ich aber drucken will, kommt mit wget folgender Error: Code: | <p>Please use a common browser<br>This site unfortunately cannot answer to 'Wget/1.8.2'<br>If you think this is an error you should contact the sites admin at [,,,] | Es ist halt eine Seite, auf der nahezu alles mit php gemacht wird ...
Gruß
Hyp |
|
Back to top |
|
|
toskala Advocate
Joined: 14 Dec 2002 Posts: 2080 Location: hamburg, germany
|
Posted: Thu Oct 21, 2004 2:15 pm Post subject: |
|
|
ja dann brauchst du halt eben einen browser der dir das zeugs rendert, dann kommste wohl um lynx nich rum, aber dann hassu ja keine bilder, oder eben doch den firefox. _________________ adopt an unanswered post
erst denken, dann posten |
|
Back to top |
|
|
reptile Guru
Joined: 19 Nov 2002 Posts: 363
|
Posted: Thu Oct 21, 2004 3:30 pm Post subject: |
|
|
zu a2ps kann ich nix sagen, aber ein shell-basierter http(s)-client wäre curl. da kann man mit
Code: |
curl -A <user-agent> <seite>
|
auch eben den user-agent angeben, zum beispiel den iexploder.
hth |
|
Back to top |
|
|
lolli78 Apprentice
Joined: 14 Jan 2004 Posts: 162 Location: Europe
|
Posted: Thu Oct 21, 2004 3:44 pm Post subject: |
|
|
hallo,
Hyp wrote: | Bei der Seite die ich aber drucken will, kommt mit wget folgender Error: Code: | <p>Please use a common browser<br>This site unfortunately cannot answer to 'Wget/1.8.2'<br>If you think this is an error you should contact the sites admin at [,,,] | Es ist halt eine Seite, auf der nahezu alles mit php gemacht wird ... |
na, das ist doch einfach. einfach mal die man-page von wget anschauen, da steht: Code: |
-U agent-string
--user-agent=agent-string
Identify as agent-string to the HTTP server.
The HTTP protocol allows the clients to identify themselves using a
"User-Agent" header field. This enables distinguishing the WWW
software, usually for statistical purposes or for tracing of proto-
col violations. Wget normally identifies as Wget/version, version
being the current version number of Wget.
However, some sites have been known to impose the policy of tailor-
ing the output according to the "User-Agent"-supplied information.
While conceptually this is not such a bad idea, it has been abused
by servers denying information to clients other than "Mozilla" or
Microsoft "Internet Explorer". This option allows you to change
the "User-Agent" line issued by Wget. Use of this option is dis-
couraged, unless you really know what you are doing.
|
jetzt musst du dir nur überlegen, ob wget sich als mozilla oder als ie ausgeben soll... wobei: der user-agent-string von ie beginnt ja auch mit "mozilla/...". da sollte man mal rechtlich dagegen vorgehen, das wäre ein spaß
viel spaß mit wget,
lorenz _________________ frag' doch deinadmin.de |
|
Back to top |
|
|
Hyp Apprentice
Joined: 14 Feb 2004 Posts: 192
|
Posted: Thu Oct 21, 2004 7:26 pm Post subject: |
|
|
Das Dumme daran ist: Damit tut es auch nicht ...
Kommt eine Fehlermeldung...
Ich möchte einfach die Druck Funktion des Firefoxes per Konsole (für ein Skript) ansprechen können ... |
|
Back to top |
|
|
Hyp Apprentice
Joined: 14 Feb 2004 Posts: 192
|
Posted: Sun Oct 24, 2004 8:05 am Post subject: |
|
|
Push |
|
Back to top |
|
|
Hyp Apprentice
Joined: 14 Feb 2004 Posts: 192
|
Posted: Sun Nov 14, 2004 12:42 pm Post subject: |
|
|
Keiner eine Idee ? |
|
Back to top |
|
|
|