On Wednesday, 11 January 2023 07:31:14 GMT Alexis wrote: > On Tue, Jan 10, 2023 at 11:52:28PM +0000, Deri wrote: > > On Tuesday, 10 January 2023 22:46:00 GMT Alexis wrote: > > > Can someone think of a way to place an image as fullpage image > > > using groff with the current state of the master branch? > > > > If you do:- > > .vs 0 > > .PDFPIC ... > > .vs > > Thank you very much, Deri, that works like a charm. > > In case I wanted to offset that fullpage image even further vertically > upward to position it so that the main subject of the image is placed > on the page where it looks most pleasing. How could that be done?
Hi Alexis, Groff's concept of an absolute position is where it would start the next text glyph on the page, so it is the base line of the current font. That is why 0,0 appears 1v down from the top, if you were to print glyphs the tallest glyph in the font should be 2p from the top edge, this is because the default values for ps/vs are 10/12. Whenever want the absolute position to be where the image is placed, set vs to zero and restore it afterwards. This is also true if you use the \D drawing commands. > > groff -Tpdf -U -P-p465p,465p full-page-pdfpic.roff > full-page-pdfpic.pdf > > is a bit faster in this case. > > Oh, that is significantly faster! > How come that using `groff -Tpdf` over `pdfroff` is faster? If a pdf has forward references within the file, groff has to run several times to satisfactorily resolve those references, which is what pdfroff does. It also uses the postscript driver and ghostscript to produce the pdf, which means the map.pdf file has to be converted to an .eps file to be embedded in the postscript given to ghostscript. In this case you have no forward references so a single run of groff is sufficient, and because of using the pdf driver, the map.pdf file can be embedded without conversion. If your file did contain forward references, and you wanted to use the pdf driver then a script like the attached is required, use in the same way as pdfroff. Cheers Deri Deri > Best > Alexis
pdfmake
Description: Perl program