This commit is contained in:
John Whitington
2022-05-18 17:47:31 +01:00
parent 15bee681ae
commit 0ea7d45506
20 changed files with 813 additions and 1153 deletions

View File

@@ -1,28 +1,15 @@
/* CHAPTER 15. PDF and JSON */
// CHAPTER 15. PDF and JSON
/** Outputs a PDF in JSON format to the given filename.
@param filename file name
@param parse_content parse page content
@param no_stream_data all stream data is suppressed entirely
@param decompress_streams streams are decompressed
@param pdf PDF document */
public void outputJSON(String filename, boolean parse_content,
boolean no_stream_data, boolean decompress_streams,
Pdf pdf)
throws CpdfError;
/** Outputs a PDF in JSON format to the given filename. If parse_content is
true, page content is parsed. If no_stream_data is true, all stream data is
suppressed entirely. If decompress_streams is true, streams are decompressed. */
function outputJSON(filename, parse_content, no_stream_data, decompress_streams, pdf)
/** Like outputJSON, but it writes to a byte array in memory.
@param pdf PDF document
@param parse_content parse page content
@param no_stream_data all stream data is suppressed entirely
@param decompress_streams streams are decompressed */
public native byte[] outputJSONMemory(Pdf pdf, boolean parse_content,
boolean no_stream_data,
boolean decompress_streams)
throws CpdfError;
/** Like outputJSON, but it writes to a byte array in memory. */
function outputJSONMemory(parse_content, no_stream_data, decompress_streams, pdf)
/** Loads a PDF from a JSON file given its filename. */
public Pdf fromJSON(String filename) throws CpdfError;
function fromJSON(filename)
/** Loads a PDF from a JSON file in memory. */
public native Pdf fromJSONMemory(byte[] data) throws CpdfError;
function fromJSONMemory(data)