From ccb78fc280c73d33e55f653ace86c2c470b52bbd Mon Sep 17 00:00:00 2001 From: John Whitington Date: Wed, 1 Oct 2014 14:59:25 +0100 Subject: [PATCH] Beginning to excise internal linearization --- cpdf.ml | 2 +- cpdfcommand.ml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cpdf.ml b/cpdf.ml index fb5841d..f5e640f 100644 --- a/cpdf.ml +++ b/cpdf.ml @@ -1433,7 +1433,7 @@ let fast_write_split_pdfs enc printf splitlevel original_filename linearize pres let name = name_of_spec printf marks main_pdf splitlevel spec number (stem original_filename) startpage endpage in Pdf.remove_unreferenced pdf; if sq then squeeze pdf; - Pdfwrite.pdf_to_file_options ~preserve_objstm ~generate_objstm:create_objstm linearize enc (not (enc = None)) pdf name) + Pdfwrite.pdf_to_file_options ~preserve_objstm ~generate_objstm:create_objstm false (*FIXLIN*) enc (not (enc = None)) pdf name) (indx pagenums) pagenums diff --git a/cpdfcommand.ml b/cpdfcommand.ml index c7f974c..544bf2f 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1787,7 +1787,7 @@ let write_pdf mk_id pdf = Pdfwrite.pdf_to_file_options ~preserve_objstm:args.preserve_objstm ~generate_objstm:args.create_objstm - args.linearize None mk_id pdf outname + false (*FIXLIN args.linearize*) None mk_id pdf outname | Stdout -> let pdf = Cpdf.recompress_pdf <| nobble pdf in if args.squeeze then Cpdf.squeeze pdf; @@ -1795,7 +1795,7 @@ let write_pdf mk_id pdf = Pdfwrite.pdf_to_channel ~preserve_objstm:args.preserve_objstm ~generate_objstm:args.create_objstm - args.linearize None mk_id pdf stdout; + false (*FIXLIN args.linearize*) None mk_id pdf stdout; flush stdout (*r For Windows *) let pdf_of_stdin user_pw owner_pw = @@ -2919,9 +2919,9 @@ let go () = error "no output specified" | File outname -> let outname = writing_ok outname in - Pdfwrite.pdf_to_file_options args.linearize None args.makenewid pdf outname + Pdfwrite.pdf_to_file_options (*FIXLIN args.linearize*) false None args.makenewid pdf outname | Stdout -> - Pdfwrite.pdf_to_channel args.linearize None args.makenewid pdf stdout; + Pdfwrite.pdf_to_channel (*FIXLIN args.linearize *) false None args.makenewid pdf stdout; flush stdout end | Some Compress -> @@ -3099,13 +3099,13 @@ let go () = Pdfwrite.pdf_to_file_options ~preserve_objstm:args.preserve_objstm ~generate_objstm:args.create_objstm - args.linearize None true pdf s + (*FIXLIN args.linearize*) false None true pdf s | [(k, _, _, _, _) as input], Stdout -> let pdf = get_pdf_from_input_kind input args.op k in Pdfwrite.pdf_to_channel ~preserve_objstm:args.preserve_objstm ~generate_objstm:args.create_objstm - args.linearize None true pdf stdout; + (*FIXLIN args.linearize*) false None true pdf stdout; flush stdout | _ -> error "ChangeId: exactly one input file and output file required." end @@ -3370,12 +3370,12 @@ let go () = Pdfwrite.pdf_to_file_options ~preserve_objstm:args.preserve_objstm ~generate_objstm:args.create_objstm - args.linearize (Some encryption) args.makenewid pdf outname + (*FIXLIN args.linearize*)false (Some encryption) args.makenewid pdf outname | Stdout -> Pdfwrite.pdf_to_channel ~preserve_objstm:args.preserve_objstm ~generate_objstm:args.create_objstm - args.linearize (Some encryption) args.makenewid pdf stdout; + (*FIXLIN args.linearize*)false (Some encryption) args.makenewid pdf stdout; flush stdout; end | Some Decrypt ->