mirror of
				https://github.com/johnwhitington/cpdf-source.git
				synced 2025-06-05 22:09:39 +02:00 
			
		
		
		
	more
This commit is contained in:
		| @@ -239,7 +239,7 @@ let pdf_of_json json = | ||||
|          | `List [`Int objnum; o] -> | ||||
|              begin match objnum with | ||||
|              | -1 -> params := object_of_json ~utf8:false o; read_utf8 (); None  | ||||
|              | 0 -> trailerdict := object_of_json ~utf8:!utf8 o; None | ||||
|              | 0 -> trailerdict := object_of_json ~utf8:false o; None (* utf8 false since /IDs are not PdfDocencoding, so don't get transformed *) | ||||
|              | n when n < 0 -> None | ||||
|              | n ->  Some (n, object_of_json ~utf8:!utf8 o) | ||||
|              end | ||||
| @@ -489,7 +489,8 @@ let json_of_pdf | ||||
|       (fun _ obj -> match obj with Pdf.Stream _ -> Pdfcodec.decode_pdfstream_until_unknown pdf obj | _ -> ()) | ||||
|       pdf; | ||||
|   Pdf.remove_unreferenced pdf; | ||||
|   let trailerdict = (0, json_of_object ~utf8 pdf (fun x -> ()) ~no_stream_data ~parse_content:false pdf.P.trailerdict) in | ||||
|   (* Not UTF8, because /ID strings are not actually in PDFDocEncoding *) | ||||
|   let trailerdict = (0, json_of_object ~utf8:false pdf (fun x -> ()) ~no_stream_data ~parse_content:false pdf.P.trailerdict) in | ||||
|   let parameters = | ||||
|     (-1, json_of_object ~utf8 pdf (fun x -> ()) ~no_stream_data:false ~parse_content:false | ||||
|       (Pdf.Dictionary [("/CPDFJSONformatversion", Pdf.Integer 3); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user