mirror of
				https://github.com/johnwhitington/cpdf-source.git
				synced 2025-06-05 22:09:39 +02:00 
			
		
		
		
	Expose into cpdflib
This commit is contained in:
		| @@ -2,8 +2,8 @@ | ||||
| let demo = false | ||||
| let noncomp = false | ||||
| let major_version = 2 | ||||
| let minor_version = 6 | ||||
| let version_date = "(24th July 2023)" | ||||
| let minor_version = 7 | ||||
| let version_date = "(devel, 21st August 2023)" | ||||
|  | ||||
| open Pdfutil | ||||
| open Pdfio | ||||
|   | ||||
| @@ -137,6 +137,9 @@ let show_composition_json filesize pdf = | ||||
|            `Tuple [`String "XRef Table"; `Int xref_table; `Float (perc xref_table)]; | ||||
|            `Tuple [`String "Unclassified"; `Int (filesize - r); `Float (perc (filesize - r))]] | ||||
|  | ||||
| let show_composition_json_blob filesize pdf = | ||||
|   Pdfio.bytes_of_string (Cpdfyojson.Safe.pretty_to_string (show_composition_json filesize pdf)) | ||||
|  | ||||
| let show_composition filesize json pdf = | ||||
|   let module J = Cpdfyojson.Safe in | ||||
|   let j = show_composition_json filesize pdf in | ||||
|   | ||||
| @@ -3,3 +3,5 @@ | ||||
| (** [show_composition filesize json pdf] prints the composition of a document to | ||||
|    Standard Output. *) | ||||
| val show_composition : int -> bool -> Pdf.t -> unit | ||||
|  | ||||
| val show_composition_json_blob : int -> Pdf.t -> Pdfio.bytes | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								cpdfmanual.pdf
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								cpdfmanual.pdf
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -2952,7 +2952,7 @@ given page range. | ||||
|     \small\noindent\verb!cpdf -info [-raw | -utf8] in.pdf! | ||||
|  | ||||
|     \vspace{1.5mm} | ||||
|     \small\noindent\verb!cpdf -page-info in.pdf! | ||||
|     \small\noindent\verb!cpdf -page-info in.pdf [<range>]! | ||||
|  | ||||
|     \vspace{1.5mm} | ||||
|     \small\noindent\verb!cpdf -pages in.pdf! | ||||
|   | ||||
| @@ -79,3 +79,8 @@ val set_metadata_date : Pdf.t -> string -> Pdf.t | ||||
|  | ||||
| (** Expands the date ["now"] to the date now. Leaves any other string alone. *)  | ||||
| val expand_date : string -> string | ||||
|  | ||||
| (** / **) | ||||
| val get_catalog_item : string -> Pdf.t -> string | ||||
|  | ||||
| val get_viewer_pref_item : string -> Pdf.t -> string | ||||
|   | ||||
		Reference in New Issue
	
	Block a user