function advancedAPI() {
    // prepend global change of basis matrix
    // (Now, instead of converting every coordinate to the pdf coordinate system, we apply a matrix
    // that does this job for us (however, texts, images and similar objects must be drawn bottom up))
    this.saveGraphicsState();
    out(new Matrix(scaleFactor, 0, 0, -scaleFactor, 0, getPageHeight() * scaleFactor).toString() + " cm");
    this.setFontSize(this.getFontSize() / scaleFactor); // The default in MrRio's implementation is "S" (stroke), whereas the default in the yWorks implementation
    // was "n" (none). Although this has nothing to do with transforms, we should use the API switch here.

    defaultPathOperation = "n";
    apiMode = ApiMode.ADVANCED;
  }
Creates new jsPDF document object instance.
@name jsPDF
@class
@param {Object} [options] - Collection of settings initializing the jsPDF-instance
@param {string} [options.orientation=portrait] - Orientation of the first page. Possible values are "portrait" or "landscape" (or shortcuts "p" or "l").<br />
@param {string} [options.unit=mm] Measurement unit (base unit) to be used when coordinates are specified.<br />
Possible values are "pt" (points), "mm", "cm", "in", "px", "pc", "em" or "ex". Note that in order to get the correct scaling for "px"
units, you need to enable the hotfix "px_scaling" by setting options.hotfixes = ["px_scaling"].
@param {string/Array} [options.format=a4] The format of the first page. Can be:<ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />
Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]
@param {boolean} [options.putOnlyUsedFonts=false] Only put fonts into the PDF, which were used.
@param {boolean} [options.compress=false] Compress the generated PDF.
@param {number} [options.precision=16] Precision of the element-positions.
@param {number} [options.userUnit=1.0] Not to be confused with the base unit. Please inform yourself before you use it.
@param {string[]} [options.hotfixes] An array of strings to enable hotfixes such as correct pixel scaling.
@param {Object} [options.encryption]
@param {string} [options.encryption.userPassword] Password for the user bound by the given permissions list.
@param {string} [options.encryption.ownerPassword] Both userPassword and ownerPassword should be set for proper authentication.
@param {string[]} [options.encryption.userPermissions] Array of permissions "print", "modify", "copy", "annot-forms", accessible by the user.
@param {number|"smart"} [options.floatPrecision=16]
@returns {jsPDF} jsPDF-instance
@description
```
{
 orientation: 'p',
 unit: 'mm',
 format: 'a4',
 putOnlyUsedFonts:true,
 floatPrecision: 16 // or "smart", default is 16
}
```

@constructor