File: cpdfspot.ml

package info (click to toggle)
cpdf 2.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,140 kB
  • sloc: ml: 35,825; makefile: 66; sh: 49
file content (13 lines) | stat: -rw-r--r-- 310 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
open Pdfutil

let list_spot_colours pdf =
  Pdf.objiter
    (fun _ obj ->
       match obj with
         Pdf.Array (Pdf.Name "/Separation"::x::_) ->
           begin match Pdf.direct pdf x with
             Pdf.Name col -> Printf.printf "%s\n" col
           | _ -> ()
           end
       | _ -> ())
    pdf