- fprintf(fp, "save\n");
-#if 0
- {
- xref *xr;
- /*
- * I used this diagnostic briefly to ensure that
- * cross-reference rectangles were being put where they
- * should be.
- */
- for (xr = page->first_xref; xr; xr = xr->next) {
- fprintf(fp, "gsave 0.7 setgray %g %g moveto",
- xr->lx/FUNITS_PER_PT, xr->ty/FUNITS_PER_PT);
- fprintf(fp, " %g %g lineto %g %g lineto",
- xr->lx/FUNITS_PER_PT, xr->by/FUNITS_PER_PT,
- xr->rx/FUNITS_PER_PT, xr->by/FUNITS_PER_PT);
- fprintf(fp, " %g %g lineto closepath fill grestore\n",
- xr->rx/FUNITS_PER_PT, xr->ty/FUNITS_PER_PT);
+ fprintf(fp, "save %s p\n", (char *)page->spare);
+
+ for (xr = page->first_xref; xr; xr = xr->next) {
+ fprintf(fp, "[%g %g %g %g]",
+ xr->lx/FUNITS_PER_PT, xr->by/FUNITS_PER_PT,
+ xr->rx/FUNITS_PER_PT, xr->ty/FUNITS_PER_PT);
+ if (xr->dest.type == PAGE) {
+ fprintf(fp, "%s x\n", (char *)xr->dest.page->spare);
+ } else {
+ ps_string(fp, xr->dest.url);
+ fprintf(fp, "u\n");