ExporterBase
Base class for all exporters
Configs
10
Configs
10Common
Other
When true links are converted to absolute by combining current window location (with replaced origin) with
resource link.
When false links are converted by combining new origin with resource link (for angular)
A function that determines when to capture the HTML for exported rows. When set to null (the default), the export happens immediately without waiting. The function receives the export configuration as a parameter. The rendering process works in chunks, using the same approach as the Grid component - displaying visible rows with an additional buffer.
Examples:
// simple timeout
new Grid({
features : {
pdfExport : {
rowReadyCondition : async () => await new Promise(resolve => setTimeout(resolve, 100))
}
}
});
// waiting for a condition
new Grid({
features : {
pdfExport : {
rowReadyCondition : async () => await promiseWithCondition
}
}
});
true to replace all linked CSS files URLs to absolute before passing HTML to the server.
When passing a string the current origin of the CSS files URLS will be replaced by the passed origin.
For example: css files pointing to /app.css will be translated from current origin to {translateURLsToAbsolute}/app.css
Misc
Properties
8
Properties
8Other
A function that determines when to capture the HTML for exported rows. When set to null (the default), the export happens immediately without waiting. The function receives the export configuration as a parameter. The rendering process works in chunks, using the same approach as the Grid component - displaying visible rows with an additional buffer.
Examples:
// simple timeout
new Grid({
features : {
pdfExport : {
rowReadyCondition : async () => await new Promise(resolve => setTimeout(resolve, 100))
}
}
});
// waiting for a condition
new Grid({
features : {
pdfExport : {
rowReadyCondition : async () => await promiseWithCondition
}
}
});
Returns all style-related tags: <style> and <link rel="stylesheet">
Functions
15
Functions
15Other
This method accepts all stylesheets (link and style tags) which are supposed to be put on the page. Use this hook method to filter or modify them.
new Grid({
features: {
pdfExport: {
// filter out inline styles and bootstrap.css
filterStyles: styles => styles.filter(item => !/(link|bootstrap.css)/.test(item))
}
}
});
| Parameter | Type | Description |
|---|---|---|
styles | String[] |
List of stylesheets to put on the exported page
Template of an extracted page.
| Parameter | Type | Description |
|---|---|---|
data | Object | Data for the page template |