Skip to content

Commit 89c6e72

Browse files
committed
fix examples
1 parent 55df9dd commit 89c6e72

31 files changed

+169
-23
lines changed

examples/absolute.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/attachments.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/background.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/basics.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ pdfmake.addFonts({
1616
});
1717
*/
1818

19+
pdfmake.setUrlAccessPolicy((url) => {
20+
// this can be used to restrict allowed domains
21+
return url.startsWith('https://');;
22+
});
23+
24+
1925
var docDefinition = {
2026
content: [
2127
'First paragraph',

examples/columns_simple.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ var pdfmake = require('../js/index'); // only during development, otherwise use
44
var Roboto = require('../fonts/Roboto');
55
pdfmake.addFonts(Roboto);
66

7+
pdfmake.setUrlAccessPolicy((url) => {
8+
// this can be used to restrict allowed domains
9+
return url.startsWith('https://');;
10+
});
11+
712

813
var docDefinition = {
914
content: [

examples/images.js

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/links.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ var pdfmake = require('../js/index'); // only during development, otherwise use
44
var Roboto = require('../fonts/Roboto');
55
pdfmake.addFonts(Roboto);
66

7+
pdfmake.setUrlAccessPolicy((url) => {
8+
// this can be used to restrict allowed domains
9+
return url.startsWith('https://');;
10+
});
11+
12+
713
var docDefinition = {
814
content: [
915
{

examples/lists.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ var pdfmake = require('../js/index'); // only during development, otherwise use
44
var Roboto = require('../fonts/Roboto');
55
pdfmake.addFonts(Roboto);
66

7+
pdfmake.setUrlAccessPolicy((url) => {
8+
// this can be used to restrict allowed domains
9+
return url.startsWith('https://');;
10+
});
11+
712

813
var docDefinition = {
914
content: [

examples/margins.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ var pdfmake = require('../js/index'); // only during development, otherwise use
44
var Roboto = require('../fonts/Roboto');
55
pdfmake.addFonts(Roboto);
66

7+
pdfmake.setUrlAccessPolicy((url) => {
8+
// this can be used to restrict allowed domains
9+
return url.startsWith('https://');;
10+
});
11+
712

813
var docDefinition = {
914
content: [

examples/outlines.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ var pdfmake = require('../js/index'); // only during development, otherwise use
44
var Roboto = require('../fonts/Roboto');
55
pdfmake.addFonts(Roboto);
66

7+
pdfmake.setUrlAccessPolicy((url) => {
8+
// this can be used to restrict allowed domains
9+
return url.startsWith('https://');;
10+
});
11+
12+
713
var docDefinition = {
814
content: [
915
{

0 commit comments

Comments
 (0)