@embedpdf/models 1.4.1 → 2.0.0-next.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/dist/pdf.d.ts CHANGED
@@ -40,10 +40,6 @@ export interface PdfDocumentObject {
40
40
  * Identity of document
41
41
  */
42
42
  id: string;
43
- /**
44
- * Name of the document
45
- */
46
- name?: string;
47
43
  /**
48
44
  * Count of pages in this document
49
45
  */
@@ -2039,10 +2035,6 @@ export interface PdfFileWithoutContent {
2039
2035
  * id of file
2040
2036
  */
2041
2037
  id: string;
2042
- /**
2043
- * Name of the file
2044
- */
2045
- name?: string;
2046
2038
  }
2047
2039
  export interface PdfFileLoader extends PdfFileWithoutContent {
2048
2040
  /**
@@ -2085,15 +2077,15 @@ export interface PdfFileUrl extends PdfFileWithoutContent {
2085
2077
  url: string;
2086
2078
  }
2087
2079
  export declare enum PdfErrorCode {
2088
- Ok = 0,// #define FPDF_ERR_SUCCESS 0 // No error.
2089
- Unknown = 1,// #define FPDF_ERR_UNKNOWN 1 // Unknown error.
2090
- NotFound = 2,// #define FPDF_ERR_FILE 2 // File not found or could not be opened.
2091
- WrongFormat = 3,// #define FPDF_ERR_FORMAT 3 // File not in PDF format or corrupted.
2092
- Password = 4,// #define FPDF_ERR_PASSWORD 4 // Password required or incorrect password.
2093
- Security = 5,// #define FPDF_ERR_SECURITY 5 // Unsupported security scheme.
2094
- PageError = 6,// #define FPDF_ERR_PAGE 6 // Page not found or content error.
2095
- XFALoad = 7,// #ifdef PDF_ENABLE_XFA
2096
- XFALayout = 8,//
2080
+ Ok = 0,// #define FPDF_ERR_SUCCESS 0
2081
+ Unknown = 1,// #define FPDF_ERR_UNKNOWN 1
2082
+ NotFound = 2,// #define FPDF_ERR_FILE 2
2083
+ WrongFormat = 3,// #define FPDF_ERR_FORMAT 3
2084
+ Password = 4,// #define FPDF_ERR_PASSWORD 4 - Password required or incorrect
2085
+ Security = 5,// #define FPDF_ERR_SECURITY 5
2086
+ PageError = 6,// #define FPDF_ERR_PAGE 6
2087
+ XFALoad = 7,// #define FPDF_ERR_XFALOAD 7
2088
+ XFALayout = 8,// #define FPDF_ERR_XFALAYOUT 8
2097
2089
  Cancelled = 9,
2098
2090
  Initialization = 10,
2099
2091
  NotReady = 11,
@@ -2153,6 +2145,20 @@ export interface PdfOpenDocumentBufferOptions {
2153
2145
  */
2154
2146
  password?: string;
2155
2147
  }
2148
+ export interface PdfRequestOptions {
2149
+ /**
2150
+ * Custom HTTP headers to include in all requests (HEAD, GET, range requests)
2151
+ * Example: { 'Authorization': 'Bearer token', 'X-Custom-Header': 'value' }
2152
+ */
2153
+ headers?: Record<string, string>;
2154
+ /**
2155
+ * Controls whether cookies are sent with requests
2156
+ * - 'omit': Never send cookies (default)
2157
+ * - 'same-origin': Send cookies for same-origin requests
2158
+ * - 'include': Always send cookies (requires CORS)
2159
+ */
2160
+ credentials?: RequestCredentials;
2161
+ }
2156
2162
  export interface PdfOpenDocumentUrlOptions {
2157
2163
  /**
2158
2164
  * Password for the document
@@ -2162,6 +2168,10 @@ export interface PdfOpenDocumentUrlOptions {
2162
2168
  * Loading mode
2163
2169
  */
2164
2170
  mode?: 'auto' | 'range-request' | 'full-fetch';
2171
+ /**
2172
+ * HTTP request options for fetching the PDF
2173
+ */
2174
+ requestOptions?: PdfRequestOptions;
2165
2175
  }
2166
2176
  export interface PdfRenderOptions {
2167
2177
  /**
@@ -2200,6 +2210,10 @@ export interface PdfRenderPageOptions extends PdfRenderOptions {
2200
2210
  * Whether to render annotations
2201
2211
  */
2202
2212
  withAnnotations?: boolean;
2213
+ /**
2214
+ * Whether to render interactive form widgets
2215
+ */
2216
+ withForms?: boolean;
2203
2217
  }
2204
2218
  export interface PdfRenderPageAnnotationOptions extends PdfRenderOptions {
2205
2219
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedpdf/models",
3
- "version": "1.4.1",
3
+ "version": "2.0.0-next.0",
4
4
  "private": false,
5
5
  "description": "Shared type definitions, data models, and utility helpers (geometry, tasks, logging, PDF primitives) that underpin every package in the EmbedPDF ecosystem.",
6
6
  "type": "module",