version 1.85, 2017/06/07 17:38:26 |
version 1.88, 2017/10/26 18:11:31 |
Line 596 pspdf_alloc(const struct manoutput *outopts) |
|
Line 596 pspdf_alloc(const struct manoutput *outopts) |
|
|
|
/* Remember millimetres -> AFM units. */ |
/* Remember millimetres -> AFM units. */ |
|
|
pagex = PNT2AFM(p, ((double)pagex * 2.834)); |
pagex = PNT2AFM(p, ((double)pagex * 72.0 / 25.4)); |
pagey = PNT2AFM(p, ((double)pagey * 2.834)); |
pagey = PNT2AFM(p, ((double)pagey * 72.0 / 25.4)); |
|
|
/* Margins are 1/9 the page x and y. */ |
/* Margins are 1/9 the page x and y. */ |
|
|
Line 742 ps_closepage(struct termp *p) |
|
Line 742 ps_closepage(struct termp *p) |
|
ps_printf(p, "%s", p->ps->psmarg); |
ps_printf(p, "%s", p->ps->psmarg); |
|
|
if (TERMTYPE_PS != p->type) { |
if (TERMTYPE_PS != p->type) { |
ps_printf(p, "ET\n"); |
|
|
|
len = p->ps->pdfbytes - p->ps->pdflastpg; |
len = p->ps->pdfbytes - p->ps->pdflastpg; |
base = p->ps->pages * 4 + p->ps->pdfbody; |
base = p->ps->pages * 4 + p->ps->pdfbody; |
|
|
Line 759 ps_closepage(struct termp *p) |
|
Line 757 ps_closepage(struct termp *p) |
|
ps_printf(p, "/Font <<\n"); |
ps_printf(p, "/Font <<\n"); |
for (i = 0; i < (int)TERMFONT__MAX; i++) |
for (i = 0; i < (int)TERMFONT__MAX; i++) |
ps_printf(p, "/F%d %d 0 R\n", i, 3 + i); |
ps_printf(p, "/F%d %d 0 R\n", i, 3 + i); |
ps_printf(p, ">>\n>>\n"); |
ps_printf(p, ">>\n>>\nendobj\n"); |
|
|
/* Page node. */ |
/* Page node. */ |
pdf_obj(p, base + 3); |
pdf_obj(p, base + 3); |
Line 824 ps_end(struct termp *p) |
|
Line 822 ps_end(struct termp *p) |
|
ps_printf(p, "<<\n"); |
ps_printf(p, "<<\n"); |
ps_printf(p, "/Type /Catalog\n"); |
ps_printf(p, "/Type /Catalog\n"); |
ps_printf(p, "/Pages 2 0 R\n"); |
ps_printf(p, "/Pages 2 0 R\n"); |
ps_printf(p, ">>\n"); |
ps_printf(p, ">>\nendobj\n"); |
xref = p->ps->pdfbytes; |
xref = p->ps->pdfbytes; |
ps_printf(p, "xref\n"); |
ps_printf(p, "xref\n"); |
ps_printf(p, "0 %zu\n", base + 1); |
ps_printf(p, "0 %zu\n", base + 1); |
Line 918 ps_begin(struct termp *p) |
|
Line 916 ps_begin(struct termp *p) |
|
ps_printf(p, "/Subtype /Type1\n"); |
ps_printf(p, "/Subtype /Type1\n"); |
ps_printf(p, "/Name /F%d\n", i); |
ps_printf(p, "/Name /F%d\n", i); |
ps_printf(p, "/BaseFont /%s\n", fonts[i].name); |
ps_printf(p, "/BaseFont /%s\n", fonts[i].name); |
ps_printf(p, ">>\n"); |
ps_printf(p, ">>\nendobj\n"); |
} |
} |
} |
} |
|
|