Skip to content

Commit

Permalink
fix 0.3 links
Browse files Browse the repository at this point in the history
  • Loading branch information
liborm85 committed Dec 30, 2021
1 parent b59754e commit 49f0716
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ hugo server

and open in browser:
```
http://localhost:1313/docs/0.2/
http://localhost:1313/docs/0.3/
```

#### Deploy webpages
Expand Down
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
baseURL = "https://pdfmake.github.io/docs/0.2/"
baseURL = "https://pdfmake.github.io/docs/0.3/"
languageCode = "en-us"
title = "pdfmake"
theme = "docdock"
Expand Down
2 changes: 1 addition & 1 deletion content/document-definition-object/svgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ weight = 29
alwaysopen = true
+++

SVGs are much like [images](/docs/0.2/document-definition-object/images/) except it is not currently possible to refer to SVGs by file or re-use from a dictionary.
SVGs are much like [images](/docs/0.3/document-definition-object/images/) except it is not currently possible to refer to SVGs by file or re-use from a dictionary.

Library [SVG-to-PDFKit](https://github.com/alafr/SVG-to-PDFKit) is used to transformation from SVG to PDF document.

Expand Down
4 changes: 2 additions & 2 deletions content/fonts/custom-fonts-client-side/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ alwaysopen = true
pdfmake uses the Roboto font by default. This guide explains how to use your own fonts with pdfmake (in client-side code).

## Two ways are now possible:
* [use virtual file system](/docs/0.2/fonts/custom-fonts-client-side/vfs/)
* **(NEW)** [use font file via URL (https:// or http:// protocol)](/docs/0.2/fonts/custom-fonts-client-side/url/)
* [use virtual file system](/docs/0.3/fonts/custom-fonts-client-side/vfs/)
* **(NEW)** [use font file via URL (https:// or http:// protocol)](/docs/0.3/fonts/custom-fonts-client-side/url/)
6 changes: 3 additions & 3 deletions content/fonts/custom-fonts-client-side/vfs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To use custom fonts, 3 steps are required:

* Copy your fonts (and other files you wish to embed) into the ```examples/fonts``` subdirectory.

* Run ```npm install``` from the pdfmake source directory (how to download repository see [here](/docs/0.2/getting-started/client-side/#repository)) to ensure all prerequisites modules are installed.
* Run ```npm install``` from the pdfmake source directory (how to download repository see [here](/docs/0.3/getting-started/client-side/#repository)) to ensure all prerequisites modules are installed.

* Run ```gulp buildFonts``` to create a new ```build/vfs_fonts.js``` (you can update `gulpfile.js` to change the base directory path or to add an alternative config for the `buildFonts` task).

Expand All @@ -44,8 +44,8 @@ You don't need to reference the files in ```examples/fonts``` anymore because al

Other ways:

* [Building font file via shell script](/docs/0.2/fonts/custom-fonts-client-side/vfs/shell/)
* [Building font file via PHP script](/docs/0.2/fonts/custom-fonts-client-side/vfs/php/)
* [Building font file via shell script](/docs/0.3/fonts/custom-fonts-client-side/vfs/shell/)
* [Building font file via PHP script](/docs/0.3/fonts/custom-fonts-client-side/vfs/php/)

## 2. assign `pdfMake.fonts` in your javascript

Expand Down
2 changes: 1 addition & 1 deletion content/fonts/custom-fonts-client-side/vfs/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ weight = 10
alwaysopen = false
+++

For a complete description of use custom fonts in client-side, read the article: [Custom fonts (client-side) > via Virtual file system (VFS)](/docs/0.2/fonts/custom-fonts-client-side/vfs/)
For a complete description of use custom fonts in client-side, read the article: [Custom fonts (client-side) > via Virtual file system (VFS)](/docs/0.3/fonts/custom-fonts-client-side/vfs/)

If you don't want to install gulp and/or just downloaded pdfMake and want to use custom fonts in client-side, you can generate the `vfs_fonts.js` with an PHP script as well. Put the code below in a file on a server with the font files you want to include in the same directory and view it in a browser. Use parameter "?tofile" in the URL to write the output to "vfs_fonts.js" in the same directory on the server, otherwise it outputs in the browser window for you to copy/paste.

Expand Down
2 changes: 1 addition & 1 deletion content/fonts/custom-fonts-client-side/vfs/shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ alwaysopen = false
+++


For a complete description of use custom fonts in client-side, read the article: [Custom fonts (client-side) > via Virtual file system (VFS)](/docs/0.2/fonts/custom-fonts-client-side/vfs/)
For a complete description of use custom fonts in client-side, read the article: [Custom fonts (client-side) > via Virtual file system (VFS)](/docs/0.3/fonts/custom-fonts-client-side/vfs/)

If you don't want to install gulp and/or just downloaded pdfMake and want to use custom fonts in client-side, you can generate the `vfs_fonts.js` with an bash-script as well:

Expand Down
2 changes: 1 addition & 1 deletion content/fonts/icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ alwaysopen = true

- make a font at http://fontello.com/ or something and download it

- from font file (for example .ttf) create vfs_fonts.js file (see how to [use custom fonts](/docs/0.2/fonts/custom-fonts-client-side/#1-create-a-new-vfs-fonts-js-containing-your-font-files))
- from font file (for example .ttf) create vfs_fonts.js file (see how to [use custom fonts](/docs/0.3/fonts/custom-fonts-client-side/#1-create-a-new-vfs-fonts-js-containing-your-font-files))

- define font in js (just defining normal might be enough):
```js
Expand Down
4 changes: 2 additions & 2 deletions content/getting-started/client-side/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ alwaysopen = true
To begin in browser with the default configuration, you should include two files:

* **pdfmake.min.js**,
* **vfs_fonts.js** - default font definition (it contains Roboto, you can however [use custom fonts instead](/docs/0.2/fonts/custom-fonts-client-side/))
* **vfs_fonts.js** - default font definition (it contains Roboto, you can however [use custom fonts instead](/docs/0.3/fonts/custom-fonts-client-side/))

```html
<!doctype html>
Expand Down Expand Up @@ -82,4 +82,4 @@ exclude: [ /node_modules/, /pdfmake.js$/ ]

#### Repository

Copy them directly from the build directory from the repository. Otherwise you can always [build it version 0.2.x from sources](https://github.com/bpampuch/pdfmake#building-from-sources).
Copy them directly from the build directory from the repository. Otherwise you can always [build it version 0.3.x from sources](https://github.com/bpampuch/pdfmake#building-from-sources).
16 changes: 8 additions & 8 deletions content/getting-started/client-side/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pdfMake.createPdf(docDefinition, options).download();
Parameters:

* `filename` _(optional)_ - PDF document file name (default 'file.pdf')
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.2/options/)
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.3/options/)

#### Open the PDF in a new window
```js
Expand All @@ -25,9 +25,9 @@ pdfMake.createPdf(docDefinition, options).open();
Parameters:

* `win` _(optional)_ - window (when an asynchronous operation)
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.2/options/)
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.3/options/)

Name can be defined only by using metadata `title` property (see [Document metadata](/docs/0.2/document-definition-object/document-medatadata/)).
Name can be defined only by using metadata `title` property (see [Document metadata](/docs/0.3/document-definition-object/document-medatadata/)).

Asynchronous example:
```js
Expand Down Expand Up @@ -55,7 +55,7 @@ pdfMake.createPdf(docDefinition, options).print();
Parameters:

* `win` _(optional)_ - window (when an asynchronous operation)
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.2/options/)
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.3/options/)

Asynchronous example:
```js
Expand Down Expand Up @@ -89,7 +89,7 @@ pdfMake.createPdf(docDefinition).getDataUrl()
```
Parameters:

* `options` _(optional)_ - advanced options see [options chapter](/docs/0.2/options/)
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.3/options/)

#### Get the PDF as base64 data
```js
Expand All @@ -103,7 +103,7 @@ pdfMake.createPdf(docDefinition, options).getBase64()
```
Parameters:

* `options` _(optional)_ - advanced options see [options chapter](/docs/0.2/options/)
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.3/options/)

#### Get the PDF as buffer
```js
Expand All @@ -115,7 +115,7 @@ pdfMake.createPdf(docDefinition).getBuffer().then((buffer) => {
```
Parameters:

* `options` _(optional)_ - advanced options see [options chapter](/docs/0.2/options/)
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.3/options/)

#### Get the PDF as Blob
```js
Expand All @@ -127,7 +127,7 @@ pdfMake.createPdf(docDefinition).getBlob().then((blob) => {
```
Parameters:

* `options` _(optional)_ - advanced options see [options chapter](/docs/0.2/options/)
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.3/options/)

#### Get document object as stream

Expand Down
2 changes: 1 addition & 1 deletion content/getting-started/server-side/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ pdfDoc.end();
Parameters for `createPdfKitDocument`:

* `docDefinition` - object with document definition
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.2/options/)
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.3/options/)
2 changes: 1 addition & 1 deletion content/getting-started/server-side/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ pdfMake.createPdf(docDefinition).write(filename).then(() => {
Parameters:

* `filename` - PDF document file name
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.2/options/)
* `options` _(optional)_ - advanced options see [options chapter](/docs/0.3/options/)
2 changes: 1 addition & 1 deletion content/options/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ weight = 30
alwaysopen = true
+++

Advanced options for creating document used in [client-side methods](/docs/0.2/getting-started/client-side/methods/) or [server-side method](/docs/0.2/getting-started/server-side/).
Advanced options for creating document used in [client-side methods](/docs/0.3/getting-started/client-side/methods/) or [server-side method](/docs/0.3/getting-started/server-side/).

Options:

Expand Down

0 comments on commit 49f0716

Please sign in to comment.