postext-pdf 1.8.5 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/__tests__/accessibility.test.js +44 -0
- package/dist/__tests__/accessibility.test.js.map +1 -1
- package/dist/__tests__/chinesePageLabels.test.d.ts +2 -0
- package/dist/__tests__/chinesePageLabels.test.d.ts.map +1 -0
- package/dist/__tests__/chinesePageLabels.test.js +58 -0
- package/dist/__tests__/chinesePageLabels.test.js.map +1 -0
- package/dist/__tests__/cjkAnnotations.test.d.ts +2 -0
- package/dist/__tests__/cjkAnnotations.test.d.ts.map +1 -0
- package/dist/__tests__/cjkAnnotations.test.js +83 -0
- package/dist/__tests__/cjkAnnotations.test.js.map +1 -0
- package/dist/__tests__/cjkDashRule.test.d.ts +2 -0
- package/dist/__tests__/cjkDashRule.test.d.ts.map +1 -0
- package/dist/__tests__/cjkDashRule.test.js +101 -0
- package/dist/__tests__/cjkDashRule.test.js.map +1 -0
- package/dist/__tests__/cjkFontFiles.test.d.ts +2 -0
- package/dist/__tests__/cjkFontFiles.test.d.ts.map +1 -0
- package/dist/__tests__/cjkFontFiles.test.js +302 -0
- package/dist/__tests__/cjkFontFiles.test.js.map +1 -0
- package/dist/__tests__/cjkGrid.test.d.ts +2 -0
- package/dist/__tests__/cjkGrid.test.d.ts.map +1 -0
- package/dist/__tests__/cjkGrid.test.js +57 -0
- package/dist/__tests__/cjkGrid.test.js.map +1 -0
- package/dist/__tests__/cjkPunctuation.test.d.ts +2 -0
- package/dist/__tests__/cjkPunctuation.test.d.ts.map +1 -0
- package/dist/__tests__/cjkPunctuation.test.js +143 -0
- package/dist/__tests__/cjkPunctuation.test.js.map +1 -0
- package/dist/__tests__/cjkTracking.test.d.ts +2 -0
- package/dist/__tests__/cjkTracking.test.d.ts.map +1 -0
- package/dist/__tests__/cjkTracking.test.js +100 -0
- package/dist/__tests__/cjkTracking.test.js.map +1 -0
- package/dist/__tests__/documentLanguage.test.js +13 -3
- package/dist/__tests__/documentLanguage.test.js.map +1 -1
- package/dist/__tests__/fallbackSpaces.test.js +49 -0
- package/dist/__tests__/fallbackSpaces.test.js.map +1 -1
- package/dist/__tests__/outlineTitles.test.js +87 -0
- package/dist/__tests__/outlineTitles.test.js.map +1 -1
- package/dist/__tests__/pdfWorker.test.js +17 -0
- package/dist/__tests__/pdfWorker.test.js.map +1 -1
- package/dist/__tests__/renderOptionsDocs.test.d.ts +2 -0
- package/dist/__tests__/renderOptionsDocs.test.d.ts.map +1 -0
- package/dist/__tests__/renderOptionsDocs.test.js +32 -0
- package/dist/__tests__/renderOptionsDocs.test.js.map +1 -0
- package/dist/__tests__/rightBinding.test.d.ts +2 -0
- package/dist/__tests__/rightBinding.test.d.ts.map +1 -0
- package/dist/__tests__/rightBinding.test.js +112 -0
- package/dist/__tests__/rightBinding.test.js.map +1 -0
- package/dist/__tests__/verticalDesignImage.test.d.ts +2 -0
- package/dist/__tests__/verticalDesignImage.test.d.ts.map +1 -0
- package/dist/__tests__/verticalDesignImage.test.js +152 -0
- package/dist/__tests__/verticalDesignImage.test.js.map +1 -0
- package/dist/__tests__/verticalText.test.d.ts +2 -0
- package/dist/__tests__/verticalText.test.d.ts.map +1 -0
- package/dist/__tests__/verticalText.test.js +380 -0
- package/dist/__tests__/verticalText.test.js.map +1 -0
- package/dist/faceFiles.d.ts +70 -0
- package/dist/faceFiles.d.ts.map +1 -0
- package/dist/faceFiles.js +154 -0
- package/dist/faceFiles.js.map +1 -0
- package/dist/fontCache.d.ts +101 -7
- package/dist/fontCache.d.ts.map +1 -1
- package/dist/fontCache.js +178 -26
- package/dist/fontCache.js.map +1 -1
- package/dist/fontFamilies.d.ts +12 -0
- package/dist/fontFamilies.d.ts.map +1 -0
- package/dist/fontFamilies.js +12 -0
- package/dist/fontFamilies.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pdf-backend/annotations.d.ts +29 -0
- package/dist/pdf-backend/annotations.d.ts.map +1 -0
- package/dist/pdf-backend/annotations.js +133 -0
- package/dist/pdf-backend/annotations.js.map +1 -0
- package/dist/pdf-backend/blockRender.d.ts.map +1 -1
- package/dist/pdf-backend/blockRender.js +160 -30
- package/dist/pdf-backend/blockRender.js.map +1 -1
- package/dist/pdf-backend/fallbackSpaces.d.ts +21 -2
- package/dist/pdf-backend/fallbackSpaces.d.ts.map +1 -1
- package/dist/pdf-backend/fallbackSpaces.js +43 -6
- package/dist/pdf-backend/fallbackSpaces.js.map +1 -1
- package/dist/pdf-backend/fontHelpers.d.ts +12 -0
- package/dist/pdf-backend/fontHelpers.d.ts.map +1 -1
- package/dist/pdf-backend/fontHelpers.js +49 -11
- package/dist/pdf-backend/fontHelpers.js.map +1 -1
- package/dist/pdf-backend/headerFooter.d.ts +8 -3
- package/dist/pdf-backend/headerFooter.d.ts.map +1 -1
- package/dist/pdf-backend/headerFooter.js +74 -16
- package/dist/pdf-backend/headerFooter.js.map +1 -1
- package/dist/pdf-backend/index.d.ts +74 -8
- package/dist/pdf-backend/index.d.ts.map +1 -1
- package/dist/pdf-backend/index.js +121 -25
- package/dist/pdf-backend/index.js.map +1 -1
- package/dist/pdf-backend/inkScale.d.ts +12 -0
- package/dist/pdf-backend/inkScale.d.ts.map +1 -0
- package/dist/pdf-backend/inkScale.js +16 -0
- package/dist/pdf-backend/inkScale.js.map +1 -0
- package/dist/pdf-backend/outlines.d.ts +12 -1
- package/dist/pdf-backend/outlines.d.ts.map +1 -1
- package/dist/pdf-backend/outlines.js +46 -16
- package/dist/pdf-backend/outlines.js.map +1 -1
- package/dist/pdf-backend/pageDecorations.d.ts +5 -1
- package/dist/pdf-backend/pageDecorations.d.ts.map +1 -1
- package/dist/pdf-backend/pageDecorations.js +22 -1
- package/dist/pdf-backend/pageDecorations.js.map +1 -1
- package/dist/pdf-backend/pageLabels.d.ts +3 -1
- package/dist/pdf-backend/pageLabels.d.ts.map +1 -1
- package/dist/pdf-backend/pageLabels.js +12 -6
- package/dist/pdf-backend/pageLabels.js.map +1 -1
- package/dist/pdf-backend/primitives.d.ts +153 -6
- package/dist/pdf-backend/primitives.d.ts.map +1 -1
- package/dist/pdf-backend/primitives.js +269 -28
- package/dist/pdf-backend/primitives.js.map +1 -1
- package/dist/pdf-backend/renderResourceBlock.d.ts +4 -0
- package/dist/pdf-backend/renderResourceBlock.d.ts.map +1 -1
- package/dist/pdf-backend/renderResourceBlock.js +105 -26
- package/dist/pdf-backend/renderResourceBlock.js.map +1 -1
- package/dist/pdf-backend/structureFlow.d.ts +5 -0
- package/dist/pdf-backend/structureFlow.d.ts.map +1 -1
- package/dist/pdf-backend/structureFlow.js +8 -0
- package/dist/pdf-backend/structureFlow.js.map +1 -1
- package/dist/pdf-backend/svgVector.d.ts.map +1 -1
- package/dist/pdf-backend/svgVector.js +13 -2
- package/dist/pdf-backend/svgVector.js.map +1 -1
- package/dist/pdf-backend/tagging.d.ts +8 -1
- package/dist/pdf-backend/tagging.d.ts.map +1 -1
- package/dist/pdf-backend/tagging.js +7 -1
- package/dist/pdf-backend/tagging.js.map +1 -1
- package/dist/pdf-backend/verticalText.d.ts +43 -0
- package/dist/pdf-backend/verticalText.d.ts.map +1 -0
- package/dist/pdf-backend/verticalText.js +284 -0
- package/dist/pdf-backend/verticalText.js.map +1 -0
- package/dist/verticalFonts.d.ts +75 -0
- package/dist/verticalFonts.d.ts.map +1 -0
- package/dist/verticalFonts.js +136 -0
- package/dist/verticalFonts.js.map +1 -0
- package/dist/worker/client.d.ts +1 -1
- package/dist/worker/client.d.ts.map +1 -1
- package/dist/worker/client.js +7 -5
- package/dist/worker/client.js.map +1 -1
- package/dist/worker/pdf.worker.js +8 -4
- package/dist/worker/pdf.worker.js.map +1 -1
- package/dist/worker/protocol.d.ts +10 -5
- package/dist/worker/protocol.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageLabels.d.ts","sourceRoot":"","sources":["../../src/pdf-backend/pageLabels.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"pageLabels.d.ts","sourceRoot":"","sources":["../../src/pdf-backend/pageLabels.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,WAAW,EACjB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,SAAS,CAAC;AA0BzD;;;;;8CAK8C;AAC9C,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,WAAW,EAAE,GAAG,IAAI,CAyC3F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PDFArray, PDFDict, PDFName, PDFNumber, PDFString, } from 'pdf-lib';
|
|
1
|
+
import { PDFArray, PDFDict, PDFHexString, PDFName, PDFNumber, PDFString, } from 'pdf-lib';
|
|
2
2
|
import { collectPageLabelRuns } from 'postext';
|
|
3
3
|
/**
|
|
4
4
|
* postext `NumeralStyle` → PDF `/S` style code. PDF 1.7 §12.4.2 supports
|
|
@@ -16,10 +16,17 @@ const STYLE_CODE = {
|
|
|
16
16
|
'upper-alpha': 'A',
|
|
17
17
|
'lower-alpha': 'a',
|
|
18
18
|
};
|
|
19
|
+
/** A page label as PDF text: a literal string when it is printable ASCII
|
|
20
|
+
* (`AA`), else UTF-16 hex (一, 〇, ①), which a literal cannot carry. */
|
|
21
|
+
function labelText(label) {
|
|
22
|
+
return /^[\x20-\x7e]*$/.test(label) ? PDFString.of(label) : PDFHexString.fromText(label);
|
|
23
|
+
}
|
|
19
24
|
/** Emit a `/PageLabels` number tree on the PDF catalog. No-op when
|
|
20
25
|
* `doc.pages` is empty. Alpha runs whose max value exceeds 26 fall back
|
|
21
26
|
* to per-page `/P` prefix entries so PDF viewers show the exact postext
|
|
22
|
-
* label (`AA`, `AB`, …) rather than the PDF repeated-letter scheme
|
|
27
|
+
* label (`AA`, `AB`, …) rather than the PDF repeated-letter scheme; so do
|
|
28
|
+
* the styles PDF has no code for (Chinese numerals, circled and fullwidth
|
|
29
|
+
* digits), each page's label written out. */
|
|
23
30
|
export function addPageLabels(pdfDoc, input) {
|
|
24
31
|
const docs = Array.isArray(input) ? input : [input];
|
|
25
32
|
// One page list for the whole PDF: a book is several documents in a row.
|
|
@@ -36,19 +43,18 @@ export function addPageLabels(pdfDoc, input) {
|
|
|
36
43
|
for (const run of runs) {
|
|
37
44
|
const code = STYLE_CODE[run.format] ?? null;
|
|
38
45
|
const isAlpha = run.format === 'upper-alpha' || run.format === 'lower-alpha';
|
|
39
|
-
if (isAlpha && run.maxValue > 26) {
|
|
46
|
+
if (!code || (isAlpha && run.maxValue > 26)) {
|
|
40
47
|
for (let i = run.startPageIndex; i <= run.endPageIndex; i++) {
|
|
41
48
|
const page = pages[i];
|
|
42
49
|
const dict = PDFDict.withContext(ctx);
|
|
43
|
-
dict.set(PDFName.of('P'),
|
|
50
|
+
dict.set(PDFName.of('P'), labelText(page.pageLabel));
|
|
44
51
|
nums.push(PDFNumber.of(i));
|
|
45
52
|
nums.push(dict);
|
|
46
53
|
}
|
|
47
54
|
continue;
|
|
48
55
|
}
|
|
49
56
|
const dict = PDFDict.withContext(ctx);
|
|
50
|
-
|
|
51
|
-
dict.set(PDFName.of('S'), PDFName.of(code));
|
|
57
|
+
dict.set(PDFName.of('S'), PDFName.of(code));
|
|
52
58
|
if (run.startAt !== 1)
|
|
53
59
|
dict.set(PDFName.of('St'), PDFNumber.of(run.startAt));
|
|
54
60
|
nums.push(PDFNumber.of(run.startPageIndex));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageLabels.js","sourceRoot":"","sources":["../../src/pdf-backend/pageLabels.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,SAAS,EACT,SAAS,GAEV,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,C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AAG,CAAC,CAAC;QACtC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5C,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC;YAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7E,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;QAC5C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC5C,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;IACzC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE,UAAU,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BlendMode, type PDFPage, type PDFFont, type Color, PDFOperator } from 'pdf-lib';
|
|
2
|
-
import type { PdfColorSpace, RoundedOutline, VDTChip } from 'postext';
|
|
1
|
+
import { BlendMode, type PDFPage, type PDFFont, type Color, PDFName, PDFOperator } from 'pdf-lib';
|
|
2
|
+
import type { CjkRegion, ForcedOrientation, PdfColorSpace, RoundedOutline, VDTChip } from 'postext';
|
|
3
3
|
import type { PageTagger } from './tagging';
|
|
4
4
|
export interface PageCtx {
|
|
5
5
|
page: PDFPage;
|
|
@@ -10,16 +10,40 @@ export interface PageCtx {
|
|
|
10
10
|
* document is not tagged. Renderers route each drawing call to a
|
|
11
11
|
* structure element or flag it as an artifact through it. */
|
|
12
12
|
tags?: PageTagger;
|
|
13
|
-
/** Set while a
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
/** Set while a frame is pushed ({@link pushFrame}: a vertical page's
|
|
14
|
+
* flow, a rotated resource block, a vertical design text): maps a rect
|
|
15
|
+
* `[x1, y1, x2, y2]` in points of the current frame — what the `*Px`
|
|
16
|
+
* helpers compute — to page user space, for the annotation and
|
|
16
17
|
* structure rects that live outside the content stream. */
|
|
17
18
|
mapRectPt?: (rect: [number, number, number, number]) => [number, number, number, number];
|
|
19
|
+
/** The frames pushed with {@link pushFrame}, outermost first, each
|
|
20
|
+
* composed with the ones outside it: a point of the innermost frame
|
|
21
|
+
* lands on the page through the last one. */
|
|
22
|
+
frames?: PdfMatrix[];
|
|
18
23
|
/** Told of every image the page paints as a placeholder (no bytes, or
|
|
19
24
|
* bytes that did not decode), with its resource when the painter knows
|
|
20
25
|
* it. Set when the host asked for render warnings. */
|
|
21
26
|
onMissingImage?: (fileId: string, resourceId?: string) => void;
|
|
27
|
+
/** Set while a vertical page's flow (or a vertical design text) paints:
|
|
28
|
+
* text is set down the column (see `verticalText.ts`). */
|
|
29
|
+
vertical?: VerticalPaint;
|
|
30
|
+
/** The character spacing (px) set with {@link setTrackingPx}: the
|
|
31
|
+
* vertical painter reads it, since it sets its own spacing inside its
|
|
32
|
+
* text objects. */
|
|
33
|
+
trackingPx?: number;
|
|
22
34
|
}
|
|
35
|
+
/** What the vertical painter needs (see `verticalText.ts`): the Chinese
|
|
36
|
+
* region whose marks it sets, the central axis of each family (em above
|
|
37
|
+
* the baseline, `VDTFlowFrame.centralBaselines`), and how many digits a
|
|
38
|
+
* number set in one upright cell may have (`cjk.uprightDigits`). */
|
|
39
|
+
export interface VerticalPaint {
|
|
40
|
+
region: CjkRegion;
|
|
41
|
+
axes?: Record<string, number>;
|
|
42
|
+
uprightDigits: number;
|
|
43
|
+
}
|
|
44
|
+
/** Set the character spacing (`Tc`) text is painted with, px, and record
|
|
45
|
+
* it on the context. */
|
|
46
|
+
export declare function setTrackingPx(ctx: PageCtx, px: number): void;
|
|
23
47
|
/** A PDF transformation matrix `[a b c d e f]` (`x' = a·x + c·y + e`,
|
|
24
48
|
* `y' = b·x + d·y + f`). */
|
|
25
49
|
export type PdfMatrix = [number, number, number, number, number, number];
|
|
@@ -32,6 +56,34 @@ export declare function applyMatrix(m: PdfMatrix, x: number, y: number): {
|
|
|
32
56
|
* drawn until {@link popTransform} goes through it. */
|
|
33
57
|
export declare function pushTransform(ctx: PageCtx, m: PdfMatrix): void;
|
|
34
58
|
export declare function popTransform(ctx: PageCtx): void;
|
|
59
|
+
/** The quarter-turn matrix of a turned frame (`VDTResourceRotation`, or
|
|
60
|
+
* a vertical page's flow, `VDTFlowFrame.rotation`) in the backend's
|
|
61
|
+
* points, y up: a frame whose `*Px` helpers flip y against the page
|
|
62
|
+
* height, as the page's own do. */
|
|
63
|
+
export declare function quarterTurnMatrix(rot: {
|
|
64
|
+
direction: 'cw' | 'ccw';
|
|
65
|
+
originX: number;
|
|
66
|
+
originY: number;
|
|
67
|
+
}, scale: number, pageHeightPt: number): PdfMatrix;
|
|
68
|
+
/** `inner` then `outer`: the matrix that maps a point of `inner`'s frame
|
|
69
|
+
* through both. */
|
|
70
|
+
export declare function composeMatrix(inner: PdfMatrix, outer: PdfMatrix): PdfMatrix;
|
|
71
|
+
/** Enter a frame: `m` concatenated onto the CTM ({@link pushTransform}),
|
|
72
|
+
* and the rects and points computed inside it mapped onto the page
|
|
73
|
+
* through it and every frame around it (`ctx.mapRectPt`,
|
|
74
|
+
* {@link mapPointPt}). Frames nest; {@link popFrame} leaves the last. */
|
|
75
|
+
export declare function pushFrame(ctx: PageCtx, m: PdfMatrix): void;
|
|
76
|
+
/** Leave the frame {@link pushFrame} entered last. */
|
|
77
|
+
export declare function popFrame(ctx: PageCtx): void;
|
|
78
|
+
/** A point `(x, y)` in points of the current frame, on the page. */
|
|
79
|
+
export declare function mapPointPt(ctx: PageCtx, x: number, y: number): {
|
|
80
|
+
x: number;
|
|
81
|
+
y: number;
|
|
82
|
+
};
|
|
83
|
+
/** The rect map of the frame around the current one (the page's for a
|
|
84
|
+
* block turned inside a vertical page's flow), or undefined on the
|
|
85
|
+
* page. */
|
|
86
|
+
export declare function outerRectMap(ctx: PageCtx): PageCtx['mapRectPt'];
|
|
35
87
|
/** Map a rect `[x1, y1, x2, y2]` through `m`, re-normalised to min / max. */
|
|
36
88
|
export declare function mapRectThrough(m: PdfMatrix, rect: [number, number, number, number]): [number, number, number, number];
|
|
37
89
|
/** Inline colour swatch (`:swatch{…}`): a square of `sidePx` on the
|
|
@@ -51,6 +103,8 @@ export declare function alphaOf(color: Color | undefined): number;
|
|
|
51
103
|
/** The `gs` operator setting constant fill (`ca`) and stroke (`CA`) alpha,
|
|
52
104
|
* one shared ExtGState per pair and page; null when both are opaque. */
|
|
53
105
|
export declare function alphaStateOp(ctx: PageCtx, fillAlpha: number, strokeAlpha?: number): PDFOperator | null;
|
|
106
|
+
/** `op` as a one-element list when set, for spreading into operator runs. */
|
|
107
|
+
export declare function opt(op: PDFOperator | null): PDFOperator[];
|
|
54
108
|
/** Back-compat alias — defaults to RGB. */
|
|
55
109
|
export declare function rgbFromHex(hex: string): Color;
|
|
56
110
|
export declare function fillRectPx(ctx: PageCtx, xPx: number, yPx: number, wPx: number, hPx: number, color: Color, blendMode?: BlendMode): void;
|
|
@@ -76,6 +130,23 @@ export declare function drawLinePx(ctx: PageCtx, x1Px: number, y1Px: number, x2P
|
|
|
76
130
|
* `xAdvance` / `xOffset`; a run without adjustments stays a plain `Tj`.
|
|
77
131
|
*/
|
|
78
132
|
export declare function showTextShaped(font: PDFFont, text: string): PDFOperator;
|
|
133
|
+
/** A show-text operator and the font (a file of the face) it shows in. */
|
|
134
|
+
export interface TextShow {
|
|
135
|
+
font: PDFFont;
|
|
136
|
+
op: PDFOperator;
|
|
137
|
+
}
|
|
138
|
+
/** The show-text operators of `text` in `font`'s face: one
|
|
139
|
+
* ({@link showTextShaped}) for a face of one file, else one per run of
|
|
140
|
+
* characters set in the same file (see `faceFiles.ts`). */
|
|
141
|
+
export declare function textShows(font: PDFFont, text: string): TextShow[];
|
|
142
|
+
/** How far `text` moves the pen in `font`'s face at `sizePx`, px, with
|
|
143
|
+
* `trackingPx` after every glyph (as {@link showTextShaped} paints it,
|
|
144
|
+
* each run in the file of the face that has it); and how many glyphs it
|
|
145
|
+
* shows. */
|
|
146
|
+
export declare function textAdvancePx(font: PDFFont, text: string, sizePx: number, trackingPx?: number): {
|
|
147
|
+
advance: number;
|
|
148
|
+
glyphs: number;
|
|
149
|
+
};
|
|
79
150
|
/**
|
|
80
151
|
* One show-text operator for a line's pieces (its words and spaces, each
|
|
81
152
|
* with the width the layout measured it at): every piece starts where the
|
|
@@ -91,6 +162,17 @@ export declare function measuredTextOperator(font: PDFFont, pieces: readonly {
|
|
|
91
162
|
text: string;
|
|
92
163
|
width: number;
|
|
93
164
|
}[], sizePx: number, trackingPx?: number): PDFOperator | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* {@link measuredTextOperator} for a face of any number of files: the
|
|
167
|
+
* pieces cut into runs by file (see `faceFiles.ts`), one show-text
|
|
168
|
+
* operator per stretch set in the same file. The pen carries across the
|
|
169
|
+
* font switches, so every piece still starts where the layout put it.
|
|
170
|
+
*/
|
|
171
|
+
export declare function measuredTextShows(font: PDFFont, pieces: readonly {
|
|
172
|
+
text: string;
|
|
173
|
+
width: number;
|
|
174
|
+
}[], sizePx: number, trackingPx?: number): TextShow[] | undefined;
|
|
175
|
+
export declare function fontKeyOn(page: PDFPage, font: PDFFont): PDFName;
|
|
94
176
|
/** Outline of the glyphs a text is drawn with (a design text's `stroke`):
|
|
95
177
|
* stroked over the fill, or alone for hollow letters. */
|
|
96
178
|
export interface TextOutline {
|
|
@@ -100,7 +182,15 @@ export interface TextOutline {
|
|
|
100
182
|
}
|
|
101
183
|
/** `actualText`, when set, is what copying, text extraction and assistive
|
|
102
184
|
* technology read for the glyphs painted (see {@link pushTextObject}). */
|
|
103
|
-
export declare function drawTextPx(ctx: PageCtx, text: string, xPx: number, baselinePx: number, font: PDFFont, sizePx: number, color: Color, outline?: TextOutline, actualText?: string
|
|
185
|
+
export declare function drawTextPx(ctx: PageCtx, text: string, xPx: number, baselinePx: number, font: PDFFont, sizePx: number, color: Color, outline?: TextOutline, actualText?: string,
|
|
186
|
+
/** Vertical text: the orientation the author gave it
|
|
187
|
+
* (`VDTLineSegment.tcy` / `orientation`). */
|
|
188
|
+
orient?: ForcedOrientation): void;
|
|
189
|
+
/** The painter of vertical text (`verticalText.ts` registers it, so this
|
|
190
|
+
* module does not import it back). */
|
|
191
|
+
type VerticalPainter = (ctx: PageCtx, text: string, xPx: number, baselinePx: number, font: PDFFont, sizePx: number, color: Color, outline?: TextOutline, actualText?: string, orient?: ForcedOrientation) => void;
|
|
192
|
+
/** Register the painter {@link drawTextPx} hands vertical text to. */
|
|
193
|
+
export declare function registerVerticalPainter(painter: VerticalPainter): void;
|
|
104
194
|
/**
|
|
105
195
|
* Paint a line's pieces (its words and spaces, with their measured widths)
|
|
106
196
|
* in one text object from `xPx`, each piece where the layout measured it
|
|
@@ -113,6 +203,62 @@ export declare function drawMeasuredTextPx(ctx: PageCtx, pieces: readonly {
|
|
|
113
203
|
text: string;
|
|
114
204
|
width: number;
|
|
115
205
|
}[], xPx: number, baselinePx: number, font: PDFFont, sizePx: number, color: Color, trackingPx?: number, actualText?: string): boolean;
|
|
206
|
+
/** `shows` inside a `/Span` whose `/ActualText` is `text`. */
|
|
207
|
+
export declare function withActualText(ctx: PageCtx, text: string, shows: readonly PDFOperator[]): PDFOperator[];
|
|
208
|
+
/**
|
|
209
|
+
* Open a `/Span` marked-content sequence whose `/ActualText` is `text`
|
|
210
|
+
* around everything painted until {@link endActualTextSpan}: a whole line
|
|
211
|
+
* set in pieces. A composed CJK line is painted segment by segment with
|
|
212
|
+
* gaps between them — characters spread for justification, the space
|
|
213
|
+
* between Han and Latin — which text extraction reads as word spaces
|
|
214
|
+
* ("我 们 用 iPhone"); the span gives it the line as written. The tagger's
|
|
215
|
+
* open sequence is closed first, and again before the span ends, so the
|
|
216
|
+
* structure's sequences nest inside it.
|
|
217
|
+
*/
|
|
218
|
+
export declare function beginActualTextSpan(ctx: PageCtx, text: string, state: LineTextState): void;
|
|
219
|
+
/** Where a line's text starts and what it is set in: the face and size of
|
|
220
|
+
* its first text, and that text (which file of a face made of several
|
|
221
|
+
* draws it). */
|
|
222
|
+
export interface LineTextState {
|
|
223
|
+
font: PDFFont;
|
|
224
|
+
text: string;
|
|
225
|
+
sizePx: number;
|
|
226
|
+
xPx: number;
|
|
227
|
+
baselinePx: number;
|
|
228
|
+
}
|
|
229
|
+
/** The text a composed CJK line is read as when its segments are painted
|
|
230
|
+
* apart (see {@link beginActualTextSpan}): the segments' text, when one
|
|
231
|
+
* of them carries tracking, is a Han–Latin space, is a mark that gave up
|
|
232
|
+
* blank (its glyph painted over its neighbour's box, `inkOffset`), hangs,
|
|
233
|
+
* is a ruby base (the line reads its base, not the reading painted over
|
|
234
|
+
* it) or a warichu note's part (read once, upper row first); else
|
|
235
|
+
* undefined. */
|
|
236
|
+
export declare function cjkLineText(segments: readonly {
|
|
237
|
+
text: string;
|
|
238
|
+
tracking?: number;
|
|
239
|
+
autospace?: boolean;
|
|
240
|
+
inkOffset?: number;
|
|
241
|
+
hangs?: boolean;
|
|
242
|
+
ruby?: unknown;
|
|
243
|
+
warichu?: unknown;
|
|
244
|
+
}[]): string | undefined;
|
|
245
|
+
/**
|
|
246
|
+
* The character spacing (`Tc`, px) a CJK mark that gave up blank is shown
|
|
247
|
+
* with (`inkOffset` set): painted `-inkOffset` before its box, its glyph
|
|
248
|
+
* then advances to where its segment ends, so the box a reader gives the
|
|
249
|
+
* glyph (its advance plus `Tc`) never runs over the next character's —
|
|
250
|
+
* poppler read a compressed `:` over the `「` after it as a line break.
|
|
251
|
+
* Undefined for any other segment, or when the font cannot measure it.
|
|
252
|
+
*/
|
|
253
|
+
export declare function compressedMarkSpacingPx(font: PDFFont, seg: {
|
|
254
|
+
text: string;
|
|
255
|
+
width: number;
|
|
256
|
+
inkOffset?: number;
|
|
257
|
+
inkScale?: number;
|
|
258
|
+
}, sizePx: number): number | undefined;
|
|
259
|
+
/** Close the span {@link beginActualTextSpan} opened, with the line's text
|
|
260
|
+
* state in force (see `lineTextState`). */
|
|
261
|
+
export declare function endActualTextSpan(ctx: PageCtx, state: LineTextState): void;
|
|
116
262
|
export declare function pushClipRect(ctx: PageCtx, xPx: number, yPx: number, wPx: number, hPx: number): void;
|
|
117
263
|
export declare function popClip(ctx: PageCtx): void;
|
|
118
264
|
/** Push a graphics state clipped to a rounded outline (px); undo with
|
|
@@ -126,4 +272,5 @@ export declare function fillOutlinePx(ctx: PageCtx, o: RoundedOutline, color: Co
|
|
|
126
272
|
export declare function drawChipBoxPx(ctx: PageCtx, chip: VDTChip, xPx: number, baselinePx: number): void;
|
|
127
273
|
/** Stroke a rounded outline (px) `thicknessPx` wide, centred on it. */
|
|
128
274
|
export declare function strokeOutlinePx(ctx: PageCtx, o: RoundedOutline, color: Color, thicknessPx: number): void;
|
|
275
|
+
export {};
|
|
129
276
|
//# sourceMappingURL=primitives.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/pdf-backend/primitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,SAAS,EAOT,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/pdf-backend/primitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,SAAS,EAOT,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,KAAK,EAGV,OAAO,EAEP,WAAW,EAoBZ,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,EAAE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