pdf-codec 5.6.0 → 5.6.1
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/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{interpret-BDVrFWhd.cjs → interpret-2_N_lh0h.cjs} +2 -3
- package/dist/{interpret---0lZPlv.js → interpret-BeMKZGBm.js} +2 -3
- package/dist/interpret-colors.cjs +1 -1
- package/dist/interpret-colors.js +1 -1
- package/dist/interpret.cjs +1 -1
- package/dist/interpret.js +1 -1
- package/dist/{raster-HUE5bw5s.cjs → raster-B8i3Tgjj.cjs} +1 -1
- package/dist/{raster-DUmwfi3F.js → raster-CIc6ot36.js} +1 -1
- package/dist/raster-text.cjs +1 -1
- package/dist/raster-text.js +1 -1
- package/dist/raster.cjs +1 -1
- package/dist/raster.js +1 -1
- package/dist/read.cjs +1 -1
- package/dist/read.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -21,7 +21,7 @@ const require_write_skipped_surfaces = require("./write-skipped-surfaces.cjs");
|
|
|
21
21
|
const require_write = require("./write.cjs");
|
|
22
22
|
const require_codec = require("./codec.cjs");
|
|
23
23
|
const require_font_face = require("./font-face.cjs");
|
|
24
|
-
const require_raster = require("./raster-
|
|
24
|
+
const require_raster = require("./raster-B8i3Tgjj.cjs");
|
|
25
25
|
exports.DEFAULT_BASELINE_TOLERANCE_EM = require_text_group.DEFAULT_BASELINE_TOLERANCE_EM;
|
|
26
26
|
exports.DEFAULT_COLUMN_GAP_EM = require_text_group.DEFAULT_COLUMN_GAP_EM;
|
|
27
27
|
exports.DEFAULT_VERTICAL_METRIC_POLICY = require_measure.DEFAULT_VERTICAL_METRIC_POLICY;
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@ import { PdfSkippedSurfacesError } from "./write-skipped-surfaces.js";
|
|
|
20
20
|
import { PdfPartialDocumentError, writePdf } from "./write.js";
|
|
21
21
|
import { PdfBytesSchema, pdfCodec } from "./codec.js";
|
|
22
22
|
import { FontFaceParseError, readFontFace } from "./font-face.js";
|
|
23
|
-
import { r as renderPdfPage } from "./raster-
|
|
23
|
+
import { r as renderPdfPage } from "./raster-CIc6ot36.js";
|
|
24
24
|
export * from "byte-codec";
|
|
25
25
|
export { DEFAULT_BASELINE_TOLERANCE_EM, DEFAULT_COLUMN_GAP_EM, DEFAULT_VERTICAL_METRIC_POLICY, DEFAULT_WORD_GAP_EM, FontFaceParseError, Jbig2ParseError, Jbig2UnsupportedError, Jpeg2000ParseError, Jpeg2000UnsupportedError, LAYOUT_FORMAT_VERSION, LayoutAnnotationQuadSchema, LayoutAnnotationSchema, LayoutAttachmentSchema, LayoutDestinationSchema, LayoutDestinationTargetSchema, LayoutDocumentSchema, LayoutDocumentSurfaceSchema, LayoutEllipseSchema, LayoutFormFieldSchema, LayoutFormWidgetSchema, LayoutImageAssetSchema, LayoutImageSchema, LayoutInternalLinkSchema, LayoutItemSchema, LayoutLayerSchema, LayoutLineSchema, LayoutLinkSchema, LayoutOutlineItemSchema, LayoutPageSchema, LayoutPathSchema, LayoutPathSegmentSchema, LayoutRectSchema, LayoutStructureElementSchema, LayoutSubpathSchema, LayoutTextSchema, NOOP_DIAGNOSTIC_SINK, PdfBytesSchema, PdfEncryptedError, PdfEncryptionError, PdfPageSelectionError, PdfParseError, PdfPartialDocumentError, PdfPasswordRequiredError, PdfSkippedSurfacesError, STANDARD_METRICS, assembleStretchyGlyph, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, decodeCcittFax, decodeJbig2Embedded, decodeJpeg2000, filterScanlines, groupPdfTextRuns, loadMathFont, looksLikeBareCodestream, parseJp2Container, pdfCodec, readFontFace, readJpeg2000Metadata, readPdf, renderPdfPage, resolveFaceWithRegistry, resolveStandardFont, runGapPt, runsShareBaseline, scaleMathStretchConstruction, sourcePageIndex, unfilterScanlines, writePdf };
|
|
@@ -306,10 +306,9 @@ function runContentStream(bytes, resources, initialState, context, depth, marked
|
|
|
306
306
|
advanceThroughString(el.bytes);
|
|
307
307
|
} else if (el.kind === "number") {
|
|
308
308
|
const adjustment = -(el.value / GLYPH_SPACE_PER_TEXT_SPACE_UNIT) * gs.fontSizePt;
|
|
309
|
-
|
|
310
|
-
if (endsRun) flushRun();
|
|
309
|
+
if (!vertical && totalLength > 0 && adjustment >= .125 * gs.fontSizePt) flushRun();
|
|
311
310
|
text.tm = require_matrix.multiplyMatrices(vertical ? require_matrix.translationMatrix(0, adjustment) : require_matrix.translationMatrix(adjustment * gs.horizScale, 0), text.tm);
|
|
312
|
-
if (
|
|
311
|
+
if (totalLength === 0) startMatrix = computeTrm(gs, text);
|
|
313
312
|
}
|
|
314
313
|
flushRun();
|
|
315
314
|
};
|
|
@@ -306,10 +306,9 @@ function runContentStream(bytes, resources, initialState, context, depth, marked
|
|
|
306
306
|
advanceThroughString(el.bytes);
|
|
307
307
|
} else if (el.kind === "number") {
|
|
308
308
|
const adjustment = -(el.value / GLYPH_SPACE_PER_TEXT_SPACE_UNIT) * gs.fontSizePt;
|
|
309
|
-
|
|
310
|
-
if (endsRun) flushRun();
|
|
309
|
+
if (!vertical && totalLength > 0 && adjustment >= .125 * gs.fontSizePt) flushRun();
|
|
311
310
|
text.tm = multiplyMatrices(vertical ? translationMatrix(0, adjustment) : translationMatrix(adjustment * gs.horizScale, 0), text.tm);
|
|
312
|
-
if (
|
|
311
|
+
if (totalLength === 0) startMatrix = computeTrm(gs, text);
|
|
313
312
|
}
|
|
314
313
|
flushRun();
|
|
315
314
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_interpret = require("./interpret-
|
|
2
|
+
const require_interpret = require("./interpret-2_N_lh0h.cjs");
|
|
3
3
|
exports.cmykColor = require_interpret.cmykColor;
|
|
4
4
|
exports.genericColor = require_interpret.genericColor;
|
|
5
5
|
exports.grayColor = require_interpret.grayColor;
|
package/dist/interpret-colors.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as grayColor, i as genericColor, o as rgbColor, r as cmykColor } from "./interpret
|
|
1
|
+
import { a as grayColor, i as genericColor, o as rgbColor, r as cmykColor } from "./interpret-BeMKZGBm.js";
|
|
2
2
|
export { cmykColor, genericColor, grayColor, rgbColor };
|
package/dist/interpret.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_interpret = require("./interpret-
|
|
2
|
+
const require_interpret = require("./interpret-2_N_lh0h.cjs");
|
|
3
3
|
exports.interpretContentStream = require_interpret.interpretContentStream;
|
|
4
4
|
exports.numAt = require_interpret.numAt;
|
package/dist/interpret.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as numAt, t as interpretContentStream } from "./interpret
|
|
1
|
+
import { n as numAt, t as interpretContentStream } from "./interpret-BeMKZGBm.js";
|
|
2
2
|
export { interpretContentStream, numAt };
|
|
@@ -11,7 +11,7 @@ const require_diagnostics = require("./diagnostics.cjs");
|
|
|
11
11
|
const require_document = require("./document.cjs");
|
|
12
12
|
const require_util_abort = require("./util/abort.cjs");
|
|
13
13
|
const require_font_read = require("./font-read.cjs");
|
|
14
|
-
const require_interpret = require("./interpret-
|
|
14
|
+
const require_interpret = require("./interpret-2_N_lh0h.cjs");
|
|
15
15
|
const require_read = require("./read.cjs");
|
|
16
16
|
const require_glyf = require("./glyf.cjs");
|
|
17
17
|
const require_glyf_contours = require("./glyf-contours.cjs");
|
|
@@ -11,7 +11,7 @@ import { NOOP_DIAGNOSTIC_SINK, PdfParseError } from "./diagnostics.js";
|
|
|
11
11
|
import { openPdfDocument } from "./document.js";
|
|
12
12
|
import { throwIfAborted } from "./util/abort.js";
|
|
13
13
|
import { createFontResolver } from "./font-read.js";
|
|
14
|
-
import { t as interpretContentStream } from "./interpret
|
|
14
|
+
import { t as interpretContentStream } from "./interpret-BeMKZGBm.js";
|
|
15
15
|
import { normalizeRotation, pageRotationTransform } from "./read.js";
|
|
16
16
|
import { parseGlyf } from "./glyf.js";
|
|
17
17
|
import { decodeGlyphOutline } from "./glyf-contours.js";
|
package/dist/raster-text.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_raster = require("./raster-
|
|
2
|
+
const require_raster = require("./raster-B8i3Tgjj.cjs");
|
|
3
3
|
exports.drawGlyphOutline = require_raster.drawGlyphOutline;
|
|
4
4
|
exports.drawTextRun = require_raster.drawTextRun;
|
|
5
5
|
exports.glyphOutlineSubpaths = require_raster.glyphOutlineSubpaths;
|
package/dist/raster-text.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as drawTextRun, i as drawGlyphOutline, o as glyphOutlineSubpaths } from "./raster-
|
|
1
|
+
import { a as drawTextRun, i as drawGlyphOutline, o as glyphOutlineSubpaths } from "./raster-CIc6ot36.js";
|
|
2
2
|
export { drawGlyphOutline, drawTextRun, glyphOutlineSubpaths };
|
package/dist/raster.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_raster = require("./raster-
|
|
2
|
+
const require_raster = require("./raster-B8i3Tgjj.cjs");
|
|
3
3
|
exports.EXTENT_ZERO_EPSILON = require_raster.EXTENT_ZERO_EPSILON;
|
|
4
4
|
exports.flattenCubic = require_raster.flattenCubic;
|
|
5
5
|
exports.renderPdfPage = require_raster.renderPdfPage;
|
package/dist/raster.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as flattenCubic, r as renderPdfPage, t as EXTENT_ZERO_EPSILON } from "./raster-
|
|
1
|
+
import { n as flattenCubic, r as renderPdfPage, t as EXTENT_ZERO_EPSILON } from "./raster-CIc6ot36.js";
|
|
2
2
|
export { EXTENT_ZERO_EPSILON, flattenCubic, renderPdfPage };
|
package/dist/read.cjs
CHANGED
|
@@ -17,7 +17,7 @@ const require_diagnostics = require("./diagnostics.cjs");
|
|
|
17
17
|
const require_document = require("./document.cjs");
|
|
18
18
|
const require_util_abort = require("./util/abort.cjs");
|
|
19
19
|
const require_font_read = require("./font-read.cjs");
|
|
20
|
-
const require_interpret = require("./interpret-
|
|
20
|
+
const require_interpret = require("./interpret-2_N_lh0h.cjs");
|
|
21
21
|
const require_navigation = require("./navigation.cjs");
|
|
22
22
|
//#region src/read.ts
|
|
23
23
|
function skippedSurfacesOf(surfaces) {
|
package/dist/read.js
CHANGED
|
@@ -16,7 +16,7 @@ import { NOOP_DIAGNOSTIC_SINK, PdfPageSelectionError, PdfParseError } from "./di
|
|
|
16
16
|
import { openPdfDocument } from "./document.js";
|
|
17
17
|
import { throwIfAborted } from "./util/abort.js";
|
|
18
18
|
import { createFontResolver } from "./font-read.js";
|
|
19
|
-
import { t as interpretContentStream } from "./interpret
|
|
19
|
+
import { t as interpretContentStream } from "./interpret-BeMKZGBm.js";
|
|
20
20
|
import { createDestinationRegistry, readOutline } from "./navigation.js";
|
|
21
21
|
//#region src/read.ts
|
|
22
22
|
function skippedSurfacesOf(surfaces) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pdf-codec",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.1",
|
|
4
4
|
"description": "Hand-written, dependency-minimal PDF codec: parses arbitrary real-world PDFs and generates new ones, built on its own codec-owned LayoutDocument item model and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|