Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Per Shell in einen .PS-File drucken
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Hyp
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 192

PostPosted: Tue Oct 19, 2004 3:24 pm    Post subject: Per Shell in einen .PS-File drucken Reply with quote

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
View user's profile Send private message
Deever
Veteran
Veteran


Joined: 06 Jul 2002
Posts: 1354
Location: Zürich / Switzerland

PostPosted: Tue Oct 19, 2004 3:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hyp
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 192

PostPosted: Tue Oct 19, 2004 5:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hyp
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 192

PostPosted: Wed Oct 20, 2004 9:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
toskala
Advocate
Advocate


Joined: 14 Dec 2002
Posts: 2080
Location: hamburg, germany

PostPosted: Thu Oct 21, 2004 7:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Hyp
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 192

PostPosted: Thu Oct 21, 2004 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
toskala
Advocate
Advocate


Joined: 14 Dec 2002
Posts: 2080
Location: hamburg, germany

PostPosted: Thu Oct 21, 2004 11:08 am    Post subject: Reply with quote

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
View user's profile Send private message
Hyp
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 192

PostPosted: Thu Oct 21, 2004 11:50 am    Post subject: Reply with quote

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
View user's profile Send private message
toskala
Advocate
Advocate


Joined: 14 Dec 2002
Posts: 2080
Location: hamburg, germany

PostPosted: Thu Oct 21, 2004 2:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
reptile
Guru
Guru


Joined: 19 Nov 2002
Posts: 363

PostPosted: Thu Oct 21, 2004 3:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
lolli78
Apprentice
Apprentice


Joined: 14 Jan 2004
Posts: 162
Location: Europe

PostPosted: Thu Oct 21, 2004 3:44 pm    Post subject: Reply with quote

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ß :twisted:

viel spaß mit wget,
lorenz
_________________
frag' doch deinadmin.de
Back to top
View user's profile Send private message
Hyp
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 192

PostPosted: Thu Oct 21, 2004 7:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hyp
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 192

PostPosted: Sun Oct 24, 2004 8:05 am    Post subject: Reply with quote

Push
Back to top
View user's profile Send private message
Hyp
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 192

PostPosted: Sun Nov 14, 2004 12:42 pm    Post subject: Reply with quote

Keiner eine Idee ?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum