Adds, documents -remove-obj

This commit is contained in:
John Whitington
2025-03-27 14:17:17 +00:00
parent 3806710a18
commit af24a461f0
4 changed files with 22 additions and 11 deletions

View File

@@ -313,7 +313,8 @@ let replace_obj pdf objspec obj =
try Pdf.replace_chain pdf (split_chain objspec) obj with
_ -> raise (Pdf.PDFError "Chain not found")
let remove_obj pdf objspec = ()
let remove_obj pdf objspec =
Pdf.removeobj pdf (int_of_string objspec)
(* Replace a stream from a file e.g 4=data.dat replaces contents of object 4.
The stream dictionary is altered only to correct the length. *)