I understand, now. Using a fifo, "Syntax Error: Document base stream is not seekable". A PDF has pointers to its dictionaries at the end. So the only way to include an image from a database in a TeX document may be to copy it to a file. Still... can't the seeking be done in memory? Read the whole thing from the pipe and then look at it?