lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

3.13 - PDF


From: Chip Salzenberg
Subject: 3.13 - PDF
Date: Mon, 15 Feb 1999 03:20:56 -0500

This patch creates PDF that's OK even if it isn't 8.5x11.
(I'm not sure about the necessity of CropBox, though.)

Index: z48.c
*************** void PDFPage_Cleanup(FILE* in_fp)
*** 3202,3205 ****
--- 3202,3208 ----
    fputs("<<\n/Type /Page\n", in_fp);
  
+   /* write out page size and orientation */
+   fprintf(in_fp, "/CropBox [ 0 0 %u %u ]\n",g_doc_h_bound,g_doc_v_bound);
+ 
    /* write out parent object ref */
    fputs("/Parent ", in_fp);
*************** static void PDFFile_WritePagesObject(FIL
*** 3389,3394 ****
    }
    fprintf(in_fp, " ]\n/Count %u\n", g_page_count);
!   fprintf(in_fp, "/MediaBox [ 0 0 612 792 ]\n");
!   /* fprintf(in_fp, "/MediaBox [ 0 0 %u %u ]\n",g_doc_h_bound,g_doc_v_bound); 
*/
    fputs(">>\nendobj\n", in_fp);
  }
--- 3392,3396 ----
    }
    fprintf(in_fp, " ]\n/Count %u\n", g_page_count);
!   fprintf(in_fp, "/MediaBox [ 0 0 %u %u ]\n",g_doc_h_bound,g_doc_v_bound);
    fputs(">>\nendobj\n", in_fp);
  }

-- 
Chip Salzenberg      - a.k.a. -      <address@hidden>
      "When do you work?"   "Whenever I'm not busy."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]