---
title: "Breaking: Replace StandaloneView with ViewFactory"
manual: "Cart Pdf"
version: "main"
permalink: "https://docs.typo3.org/permalink/extcode/cart-pdf:breaking-replace-standaloneview-with-viewfactory@main"
source: "Changelog/8.0/Breaking-ReplaceStandaloneView.rst"
rendered: "2026-11-13T10:23:42+00:00"
---

# Breaking: Replace StandaloneView with ViewFactory {#breaking-replace-standaloneview-with-viewfactory}

## Description {#description}

The Fluid `StandaloneView` is deprecated since TYPO3 v13 and will be
removed in TYPO3 v14. `\Extcode\CartPdf\Service\TcpdfWrapper` creates its
views via `\TYPO3\CMS\Core\View\ViewFactoryInterface` now. The view factory
is injected into `\Extcode\CartPdf\Service\PdfService` and handed over to
the `TcpdfWrapper`.

This changes the public API of `TcpdfWrapper`:

-   `TcpdfWrapper::getStandaloneView()` is renamed to
    `TcpdfWrapper::createView()`. It returns a
    `\TYPO3\CMS\Core\View\ViewInterface` instead of a
    `\TYPO3\CMS\Fluid\View\StandaloneView`.
-   `TcpdfWrapper::renderStandaloneView()` is renamed to
    `TcpdfWrapper::renderView()`. The arguments are unchanged.
-   The constructor and `TcpdfWrapper::createWithTypeAndSettings()` expect
    a `\TYPO3\CMS\Core\View\ViewFactoryInterface` as first argument.

The template resolution via the TypoScript settings `view.templateRootPaths`,
`view.partialRootPaths` and `view.layoutRootPaths` is unchanged. The
rendered documents do not change.

## Affected Installations {#affected-installations}

Installations which create a `TcpdfWrapper` or call
`TcpdfWrapper::getStandaloneView()` or
`TcpdfWrapper::renderStandaloneView()` in their own code, e.g. in an own
implementation of `\Extcode\CartPdf\Service\DocumentRenderServiceInterface`
or in a class extending `TcpdfWrapper`.

Installations which configure the documents via TypoScript and templates
only are not affected.

## Migration {#migration}

-   Inject `\TYPO3\CMS\Core\View\ViewFactoryInterface` and pass it as first
    argument to `new TcpdfWrapper()` or
    `TcpdfWrapper::createWithTypeAndSettings()`.
-   Replace calls of `getStandaloneView()` with `createView()`. Use only
    the methods of `\TYPO3\CMS\Core\View\ViewInterface` (`assign()`,
    `assignMultiple()`, `render()`) on the returned view and adapt type
    hints accordingly.
-   Replace calls of `renderStandaloneView()` with `renderView()`.
