Thread View: comp.lang.postscript
7 messages
7 total messages
Started by NoHtmlMailsPlease
Fri, 23 Sep 2011 13:11
How2 wrap 8 text-lines in *.ps?
Author: NoHtmlMailsPlease
Date: Fri, 23 Sep 2011 13:11
Date: Fri, 23 Sep 2011 13:11
16 lines
1871 bytes
1871 bytes
My final aim is to have adobe's pdf to speech not make unnatural breaks, because of page-breaks which don't correspond to paragraph-breaks; which is what I get when I use openOffice for text to pdf. The "hello world" ps-tut doesn't deal with stepping the y-coordinates down to the next line. How should I do this, without getting married to ANOTHER programming language? ==TIA
Re: How2 wrap 8 text-lines in *.ps?
Author: Rod Dorman
Date: Fri, 23 Sep 2011 19:07
Date: Fri, 23 Sep 2011 19:07
24 lines
2036 bytes
2036 bytes
In article <j5ifr2$m3c$2@dont-email.me>, NoHtmlMailsPlease <UsePlainText@dog.edu> wrote: >My final aim is to have adobe's pdf to speech not >make unnatural breaks, because of page-breaks which >don't correspond to paragraph-breaks; >which is what I get when I use openOffice for >text to pdf. > >The "hello world" ps-tut doesn't deal with stepping the >y-coordinates down to the next line. > >How should I do this, without getting married to ANOTHER >programming language? There isn't any concept of "next line" in PostScript. Changing the coordinates can be done in more than one way, which method is used is up the the program that generates the PostScript program (or the programmer in the case where you're doing it via a text editor) -- -- Rod -- rodd(at)polylogics(dot)com
Re: How2 wrap 8 text-lines in *.ps?
Author: luser- -droog
Date: Sat, 24 Sep 2011 08:03
Date: Sat, 24 Sep 2011 08:03
37 lines
3062 bytes
3062 bytes
On Sep 23, 8:11 am, "NoHtmlMailsPlease" <UsePlainT...@dog.edu> wrote: > My final aim is to have adobe's pdf to speech not > make unnatural breaks, because of page-breaks which > don't correspond to paragraph-breaks; > which is what I get when I use openOffice for > text to pdf. > > The "hello world" ps-tut doesn't deal with stepping the > y-coordinates down to the next line. > > How should I do this, without getting married to ANOTHER > programming language? > > ==TIA Well, you need to download (or buy) the Adobe books. The Blue Book is a better tutorial than anything else (and free online), and the cookbook section has good ideas to get you started. For the kind of stuff you're describing you certainly will need to "get married" to postscript, as you say. The book for what you're trying to do is the Green Book. It explains how to design the postscript programs that produce documents. But you won't understand it without having done the prep work. While the Red Book (Postscript Language Reference Manual or PLRM) is available online, the third edition is quite overwhelming. I strongly recommend to anyone learning postscript that they buy a first edition manual. It's less than 1 inch thick! It has the stuff you need. The operator summary tells you what page to find the details on. It really is a nice, concise manual. If any of this fires your imagination, I recommend Postscript By Example. I'm too sleepy to praise this book adequately.
Re: How2 wrap 8 text-lines in *.ps?
Author: NoHtmlMailsPlease
Date: Tue, 27 Sep 2011 11:10
Date: Tue, 27 Sep 2011 11:10
35 lines
2735 bytes
2735 bytes
"Rod Dorman" <rodd@panix.com> wrote in message news:j5ildf$cgu$1@reader1.panix.com... > In article <j5ifr2$m3c$2@dont-email.me>, > NoHtmlMailsPlease <UsePlainText@dog.edu> wrote: >>My final aim is to have adobe's pdf to speech not >>make unnatural breaks, because of page-breaks which >>don't correspond to paragraph-breaks; >>which is what I get when I use openOffice for >>text to pdf. >> >>The "hello world" ps-tut doesn't deal with stepping the >>y-coordinates down to the next line. >> >>How should I do this, without getting married to ANOTHER >>programming language? > > There isn't any concept of "next line" in PostScript. My brief look at the docus suggests that <newLine> could be programmed as: /Nline <decr y-coordinate per font size> <move abs x-coordinate to line-start> def but I was hoping for a briefer method from here. > > Changing the coordinates can be done in more than one way, which > method is used is up the the program that generates the PostScript > program (or the programmer in the case where you're doing it via a > text editor) > > -- > -- Rod -- > rodd(at)polylogics(dot)com
Re: How2 wrap 8 text-lines in *.ps?
Author: NoHtmlMailsPlease
Date: Tue, 27 Sep 2011 11:28
Date: Tue, 27 Sep 2011 11:28
65 lines
4234 bytes
4234 bytes
"luser- -droog" <mijoryx@yahoo.com> wrote in message news:63fea13a-e003-48c6-ac27-e355eb83ffe0@g33g2000yqc.googlegroups.com... > On Sep 23, 8:11 am, "NoHtmlMailsPlease" <UsePlainT...@dog.edu> wrote: >> My final aim is to have adobe's pdf to speech not >> make unnatural breaks, because of page-breaks which >> don't correspond to paragraph-breaks; >> which is what I get when I use openOffice for >> text to pdf. >> >> The "hello world" ps-tut doesn't deal with stepping the >> y-coordinates down to the next line. >> >> How should I do this, without getting married to ANOTHER >> programming language? >> >> ==TIA > > Well, you need to download (or buy) the Adobe books. The Blue > Book is a better tutorial than anything else (and free online), > and the cookbook section has good ideas to get you started. > For the kind of stuff you're describing you certainly will > need to "get married" to postscript, as you say. > > The book for what you're trying to do is the Green Book. It > explains how to design the postscript programs that produce > documents. But you won't understand it without having done > the prep work. > > While the Red Book (Postscript Language Reference Manual or > PLRM) is available online, the third edition is quite > overwhelming. I strongly recommend to anyone learning > postscript that they buy a first edition manual. It's less > than 1 inch thick! It has the stuff you need. The operator > summary tells you what page to find the details on. > It really is a nice, concise manual. > > If any of this fires your imagination, I recommend > Postscript By Example. I'm too sleepy to praise this book > adequately. Some times I say "I want to speak to the injun-year & not the sales-clerk ", but let me rather admit how I failed to see-the-wood-for-the-trees. Since my final aim is only to NOT have page-breaks in the middle of sentences, all I needed to do was, use an editor/word-proc, which can output ps/pdf, and manually <adjust each end of page>. But the first one which I did this on, & moved it from linux to Win7 via a stik; the Adobe-dolly said dot dot dot ....why. That's "why" as in Y. Which is strange, since the *.pdf looked perfect under Win7 & linux. Oh crap!! I've just realised: it's not how the *.pdf LOOKs, it's whether it can be `pdftoascii -ed`. Since the failed-to-talk *.pdf was derived from ascii, I'd expect that to NOT be the problem. And I'd like to discuss OCR for pdf/ps which won't autoconvert to ascii, with people who can think-out-of-the-box.
Re: How2 wrap 8 text-lines in *.ps?
Author: Rod Dorman
Date: Tue, 27 Sep 2011 18:44
Date: Tue, 27 Sep 2011 18:44
30 lines
2304 bytes
2304 bytes
In article <j5scc5$pak$1@dont-email.me>, NoHtmlMailsPlease <UsePlainText@dog.edu> wrote: >"Rod Dorman" <rodd@panix.com> wrote in message >news:j5ildf$cgu$1@reader1.panix.com... >> ... >> There isn't any concept of "next line" in PostScript. > >My brief look at the docus suggests that <newLine> could be programmed as: >/Nline <decr y-coordinate per font size> > <move abs x-coordinate to line-start> def Define what you mean by "per font size". Is that something your PostScript emitting program is tracking or are you expecting the PostScript RIP to somehow figure it out for you? Consider a "line" that starts off with a 16 point high ornamental character EPS followed by a mix of 12 point Helvetica and 10 point Palatino-Bold characters. You'll need to "decr y-coordinate" by at least 16 points (probably a little more to avoid decenders) before emitting the PostScript code for that "line". In PostScript you first position the baseline before drawing the text which means you have to figure out how tall that line is going to be before you can do the move. -- -- Rod -- rodd(at)polylogics(dot)com
Re: How2 wrap 8 text-lines in *.ps?
Author: RedGrittyBrick
Date: Sun, 19 Feb 2012 13:46
Date: Sun, 19 Feb 2012 13:46
41 lines
3307 bytes
3307 bytes
On 23/09/2011 14:11, NoHtmlMailsPlease wrote: > My final aim is to have adobe's pdf to speech not > make unnatural breaks, because of page-breaks which > don't correspond to paragraph-breaks; > which is what I get when I use openOffice for text to pdf. There is almost certainly no existing program that creates PDF files suitably optimised for a specific PDF-to-speech application. > The "hello world" ps-tut Perhaps you mean http://en.wikipedia.org/wiki/PostScript#.22Hello_world.22 or something very like it. > doesn't deal with stepping the > y-coordinates down to the next line. > > How should I do this, without getting married to ANOTHER > programming language? You can't do this in Postscript without learning the Postscript programming language to an elementary level of competence. You could try http://terpconnect.umd.edu/~zben/PostScript/asciiprint.html but I've no idea whether it produces PS from which GS can produce PDF from which your PDF-to-speech application can produce intelligible speech. If your goal is to convert some existing text to something that is very well suited to a text-to-speech application, I believe it would be best to avoid PS or PDF as initial or intermediate formats. I would evaluate using either plain-text or one of the more common book-reader formats (e.g. mobi). I believe some models of Kindle can read books aloud, perhaps their PC "kindle" software also can. -- RGB
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads