• Bug#266166: fixed patch

    From Jason McCarty@1:229/2 to All on Tue Aug 17 02:30:08 2004
    From: [email protected]

    [sigh] I botched my patch just a little. Here's a fixed version (it used
    to output an extraneous () for unlabeled pages).


    --- lib/pdf2dsc.ps.orig 2004-08-01 02:25:08.000000000 -0400
    +++ lib/pdf2dsc.ps 2004-08-16 20:01:09.000000000 -0400
    @@ -51,14 +51,6 @@
    /DSCstring 255 string def
    /MediaTypes 10 dict def

    -% (str1) (str2) concatstr (str1str2)
    -/concatstr {
    - 2 copy length exch length add string
    - dup dup 5 2 roll copy length
    -% stack: newstring newstring str2 str1-length
    - exch putinterval
    -} bind def
    -
    GS_PDF_ProcSet begin
    pdfdict begin
    PDFfile
    @@ -73,7 +65,7 @@
    3 -1 roll sub 3 1 roll exch sub exch
    2 array astore
    aload 3 1 roll 10 string cvs exch 10 string cvs
    - (x) exch concatstr concatstr cvn
    + (x) 3 -1 roll concatstrings concatstrings cvn
    MediaTypes 3 1 roll exch put
    } for

    @@ -122,10 +114,85 @@
    DSCfile PDFname write==only
    ( \(r\) file pdfopen begin\n) puts
    (%%EndSetup\n) puts
    +
    + /HasPageLabels false def % see "Page Labels" in the PDF Reference
    + Trailer /Root knownoget {
    + /PageLabels knownoget {
    + /Page