Hi Tomas, > I have attached a prototype pdf generator pdf.l. It can be used to > generate pdf files directly without going through @lib/ps.l. It is
Great! This is another thing I would have liked to do, but never found the time. The procedure with going through PostScript is a mess (but, on the other hand, sometimes necessary e.g. when directly printing to a PostScript printer as we do for some customers). Let me look at it in more detail later. To your question: > Alex, I need to call 'lseek' function. How could I get hold of the > current input and output file descriptors? I want to feed it to the > ... > (fpos (ifd) 123) # set current position to 123rd byte from start of the > file > (fpos (ifd) 0 1) # get current position Yep, implementing 'ifd' and 'ofd' (analog to 'ipid' and 'opid') would be the right way. For a quick solution, you can directly access the file descriptors from within your function, via the globals 'InFile' and 'OutFile': > ... > off_t z = lseek(InFile->fd, offset, whence); > ... Cheers, - Alex -- UNSUBSCRIBE: mailto:[email protected]?subject=unsubscribe
