cpdf-source/javascriptsplits/c04.tex

68 lines
2.3 KiB
TeX
Raw Normal View History

2022-05-18 18:47:31 +02:00
// CHAPTER 3. Pages
/** Scales the page dimensions and content by the given scale, about (0, 0).
Other boxes (crop etc. are altered as appropriate) */
function scalePages(pdf, range, sx, sy)
/** Scales the content to fit new page dimensions (width x height) multiplied
by scale (typically 1.0). Other boxes (crop etc. are altered as appropriate). */
function scaleToFit(pdf, range, sx, sy, scale)
/** Scales the page content to fit the given page size, possibly multiplied by
scale (typically 1.0) */
function scaleToFitPaper(pdf, range, papersize, s)
2022-05-12 17:57:13 +02:00
/** Scales the contents of the pages in the range about the point given by
2022-05-18 18:47:31 +02:00
the position, by the scale given. */
function scaleContents(pdf, range, position, scale)
/** Shifts the content of the pages in the range. */
function shiftContents(pdf, range, dx, dy)
/** Changes the viewing rotation to an absolute value. Appropriate rotations
are 0, 90, 180, 270. */
function rotate(pdf, range, rotation)
2022-05-12 17:57:13 +02:00
/** Rotates the content about the centre of the page by the given number of
2022-05-18 18:47:31 +02:00
degrees, in a clockwise direction. */
function rotateBy(pdf, range, rotation)
/** Rotates the content about the centre of the page by the given number of
degrees, in a clockwise direction. */
function rotateContents(pdf, range, angle)
/** Changes the viewing rotation of the pages in the range, counter-rotating
the dimensions and content such that there is no visual change. */
function upright(pdf, range)
2022-05-12 17:57:13 +02:00
/** Flips horizontally the pages in the range. */
2022-05-18 18:47:31 +02:00
function hFlip(pdf, range)
2022-05-12 17:57:13 +02:00
/** Flips vertically the pages in the range. */
2022-05-18 18:47:31 +02:00
function vFlip(pdf, range)
2022-05-12 17:57:13 +02:00
/** Crops a page, replacing any existing crop box. The dimensions are in
2022-05-18 18:47:31 +02:00
points. */
function crop(pdf, range, x, y, w, h)
2022-05-12 17:57:13 +02:00
/** Removes any crop box from pages in the range. */
2022-05-18 18:47:31 +02:00
function removeCrop(pdf, range)
2022-05-12 17:57:13 +02:00
/** Removes any trim box from pages in the range. */
2022-05-18 18:47:31 +02:00
function removeTrim(pdf, range)
2022-05-12 17:57:13 +02:00
/** Removes any art box from pages in the range. */
2022-05-18 18:47:31 +02:00
function removeArt(pdf, range)
2022-05-12 17:57:13 +02:00
/** Removes any bleed box from pages in the range. */
2022-05-18 18:47:31 +02:00
function removeBleed(pdf, range)
2022-05-12 17:57:13 +02:00
/** Adds trim marks to the given pages, if the trimbox exists. */
2022-05-18 18:47:31 +02:00
function trimMarks(pdf, range)
2022-05-12 17:57:13 +02:00
/** Shows the boxes on the given pages, for debug. */
2022-05-18 18:47:31 +02:00
function showBoxes(pdf, range)
/** Makes a given box a 'hard box' i.e clips it explicitly. */
function hardBox(pdf, range, boxname)