cpdf-source/javascriptsplits/c15.tex

75 lines
3.1 KiB
TeX
Raw Normal View History

2022-05-18 18:47:31 +02:00
// CHAPTER 14. Fonts.
2022-08-10 20:07:58 +02:00
/** Retrieves font information. First, call startGetFontInfo(pdf). Now call
numberFonts to return the number of fonts. For each font, call one or more of
getFontPage, getFontName, getFontType, and getFontEncoding giving a serial
number 0..n - 1 to return information. Finally, call endGetFontInfo to clean
up.
@ {pdf} pdf PDF document */
function startGetFontInfo(pdf) {}
/** Retrieves font information. First, call startGetFontInfo(pdf). Now call
numberFonts to return the number of fonts. For each font, call one or more of
getFontPage, getFontName, getFontType, and getFontEncoding giving a serial
number 0..n - 1 to return information. Finally, call endGetFontInfo to clean
up.
@result {number} number of fonts */
function numberFonts() {}
/** Retrieves font information. First, call startGetFontInfo(pdf). Now call
numberFonts to return the number of fonts. For each font, call one or more of
getFontPage, getFontName, getFontType, and getFontEncoding giving a serial
number 0..n - 1 to return information. Finally, call endGetFontInfo to clean
up.
@arg {number} n serial number
@return {number} page number */
function getFontPage(n) {}
/** Retrieves font information. First, call startGetFontInfo(pdf). Now call
numberFonts to return the number of fonts. For each font, call one or more of
getFontPage, getFontName, getFontType, and getFontEncoding giving a serial
number 0..n - 1 to return information. Finally, call endGetFontInfo to clean
up.
@arg {number} n serial number
@return {string} font name */
function getFontName(n) {}
/** Retrieves font information. First, call startGetFontInfo(pdf). Now call
numberFonts to return the number of fonts. For each font, call one or more of
getFontPage, getFontName, getFontType, and getFontEncoding giving a serial
number 0..n - 1 to return information. Finally, call endGetFontInfo to clean
up.
@arg {number} n serial number
@return {string} font type */
function getFontType(n) {}
/** Retrieves font information. First, call startGetFontInfo(pdf). Now call
numberFonts to return the number of fonts. For each font, call one or more of
getFontPage, getFontName, getFontType, and getFontEncoding giving a serial
number 0..n - 1 to return information. Finally, call endGetFontInfo to clean
up.
@arg {number} n serial number
@return {string} font encoding */
function getFontEncoding(n) {}
2022-05-18 18:47:31 +02:00
/** Retrieves font information. First, call startGetFontInfo(pdf). Now call
numberFonts to return the number of fonts. For each font, call one or more of
getFontPage, getFontName, getFontType, and getFontEncoding giving a serial
number 0..n - 1 to return information. Finally, call endGetFontInfo to clean
up. */
2022-08-10 20:07:58 +02:00
function endGetFontInfo() {}
2022-05-12 17:57:13 +02:00
2022-08-10 20:07:58 +02:00
/** Removes all font data from a file.
@arg {pdf} pdf PDF document */
function removeFonts(pdf) {}
2022-05-12 17:57:13 +02:00
2022-05-18 18:47:31 +02:00
/** Copies the given font from the given page in the 'from' PDF to every page
2022-08-10 20:07:58 +02:00
in the range of the 'to' PDF. The new font is stored under its font name.
@arg {pdf} docfrom source document
@arg {pdf} docto destination document
@arg {range} page range
@arg {number} pagenumber source page number
@arg {string} fontname font name */
function copyFont(docfrom, docto, range, pagenumber, fontname) {}