renderpdf-js 0.0.0-stage → 0.2.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.
@@ -0,0 +1,7 @@
1
+ import type { ImagePDFOptions, ImageSource, RenderPDFResult } from './api-types.js';
2
+ /** Convert one standalone PNG/JPEG or every main TIFF frame to an immutable PDF result. */
3
+ export declare function imageToPDF(
4
+ /** Complete image bytes or browser File/Blob; filenames and MIME types do not determine decoding. */
5
+ source: ImageSource,
6
+ /** Shared paper settings, metadata, cancellation and optional stage-local progress. */
7
+ options?: ImagePDFOptions): Promise<RenderPDFResult>;
@@ -0,0 +1,4 @@
1
+ /** Identify native bitmap bytes and reject unsupported or ambiguous JPEG orientation. */
2
+ export declare function nativeImageFormat(
3
+ /** Original browser-accessible compressed image; no filename or MIME type is trusted. */
4
+ bytes: Uint8Array): 'png' | 'jpeg';
@@ -0,0 +1,6 @@
1
+ export { renderPDF } from './render-pdf.js';
2
+ export { imageToPDF } from './image-pdf.js';
3
+ export { registerFont } from './fonts.js';
4
+ export { RenderPDFError } from './diagnostics.js';
5
+ export type { RenderErrorCode, RenderWarning } from './diagnostics.js';
6
+ export type { FontSource, RegisteredFont, PageMargins, PDFPageOptions, ImageSource, ImagePDFOptions, CustomPageSize, PageTextOptions, PDFMetadata, RenderStage, RenderProgress, RenderPDFOptions, RenderPDFResult, } from './api-types.js';