Beginning to excise internal linearization
This commit is contained in:
parent
5793a24e28
commit
ccb78fc280
2
cpdf.ml
2
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
|
let name = name_of_spec printf marks main_pdf splitlevel spec number (stem original_filename) startpage endpage in
|
||||||
Pdf.remove_unreferenced pdf;
|
Pdf.remove_unreferenced pdf;
|
||||||
if sq then squeeze 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)
|
(indx pagenums)
|
||||||
pagenums
|
pagenums
|
||||||
|
|
||||||
|
|
|
@ -1787,7 +1787,7 @@ let write_pdf mk_id pdf =
|
||||||
Pdfwrite.pdf_to_file_options
|
Pdfwrite.pdf_to_file_options
|
||||||
~preserve_objstm:args.preserve_objstm
|
~preserve_objstm:args.preserve_objstm
|
||||||
~generate_objstm:args.create_objstm
|
~generate_objstm:args.create_objstm
|
||||||
args.linearize None mk_id pdf outname
|
false (*FIXLIN args.linearize*) None mk_id pdf outname
|
||||||
| Stdout ->
|
| Stdout ->
|
||||||
let pdf = Cpdf.recompress_pdf <| nobble pdf in
|
let pdf = Cpdf.recompress_pdf <| nobble pdf in
|
||||||
if args.squeeze then Cpdf.squeeze pdf;
|
if args.squeeze then Cpdf.squeeze pdf;
|
||||||
|
@ -1795,7 +1795,7 @@ let write_pdf mk_id pdf =
|
||||||
Pdfwrite.pdf_to_channel
|
Pdfwrite.pdf_to_channel
|
||||||
~preserve_objstm:args.preserve_objstm
|
~preserve_objstm:args.preserve_objstm
|
||||||
~generate_objstm:args.create_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 *)
|
flush stdout (*r For Windows *)
|
||||||
|
|
||||||
let pdf_of_stdin user_pw owner_pw =
|
let pdf_of_stdin user_pw owner_pw =
|
||||||
|
@ -2919,9 +2919,9 @@ let go () =
|
||||||
error "no output specified"
|
error "no output specified"
|
||||||
| File outname ->
|
| File outname ->
|
||||||
let outname = writing_ok outname in
|
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 ->
|
| 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
|
flush stdout
|
||||||
end
|
end
|
||||||
| Some Compress ->
|
| Some Compress ->
|
||||||
|
@ -3099,13 +3099,13 @@ let go () =
|
||||||
Pdfwrite.pdf_to_file_options
|
Pdfwrite.pdf_to_file_options
|
||||||
~preserve_objstm:args.preserve_objstm
|
~preserve_objstm:args.preserve_objstm
|
||||||
~generate_objstm:args.create_objstm
|
~generate_objstm:args.create_objstm
|
||||||
args.linearize None true pdf s
|
(*FIXLIN args.linearize*) false None true pdf s
|
||||||
| [(k, _, _, _, _) as input], Stdout ->
|
| [(k, _, _, _, _) as input], Stdout ->
|
||||||
let pdf = get_pdf_from_input_kind input args.op k in
|
let pdf = get_pdf_from_input_kind input args.op k in
|
||||||
Pdfwrite.pdf_to_channel
|
Pdfwrite.pdf_to_channel
|
||||||
~preserve_objstm:args.preserve_objstm
|
~preserve_objstm:args.preserve_objstm
|
||||||
~generate_objstm:args.create_objstm
|
~generate_objstm:args.create_objstm
|
||||||
args.linearize None true pdf stdout;
|
(*FIXLIN args.linearize*) false None true pdf stdout;
|
||||||
flush stdout
|
flush stdout
|
||||||
| _ -> error "ChangeId: exactly one input file and output file required."
|
| _ -> error "ChangeId: exactly one input file and output file required."
|
||||||
end
|
end
|
||||||
|
@ -3370,12 +3370,12 @@ let go () =
|
||||||
Pdfwrite.pdf_to_file_options
|
Pdfwrite.pdf_to_file_options
|
||||||
~preserve_objstm:args.preserve_objstm
|
~preserve_objstm:args.preserve_objstm
|
||||||
~generate_objstm:args.create_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 ->
|
| Stdout ->
|
||||||
Pdfwrite.pdf_to_channel
|
Pdfwrite.pdf_to_channel
|
||||||
~preserve_objstm:args.preserve_objstm
|
~preserve_objstm:args.preserve_objstm
|
||||||
~generate_objstm:args.create_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;
|
flush stdout;
|
||||||
end
|
end
|
||||||
| Some Decrypt ->
|
| Some Decrypt ->
|
||||||
|
|
Loading…
Reference in New Issue