PTDocumentController is increasing my toolbar height

Product: PDFTron SDK iOS

Product Version: Latest

Please give a brief summary of your issue:
When I have a ViewController with a view. In this view I’m embeeding a PTDocumentController. Doing this increases the size of my tab bar

Captura de pantalla 2021-11-12 a las 11.25.47

Please describe your issue and provide steps to reproduce it:

  1. Create custom TabBarViewController
  2. Configure the tabs. First tab is associated to a custom View Controller.
  3. Add a view to this View Controller.
  4. Embeed a PTDocumentSliderViewController in this View.

Please provide a link to a minimal sample where the issue is reproducible:

Hello there,
Thank you for getting in touch about this issue.
Are you able to provide some sample code showing how you are setting up your view controllers? If you can provide a minimal working sample project then we will be better able to assist you. Thank you.

This is my code:

I have a Viewcontroller with a view inside where I’m embeeding another VC:

import UIKit
import PDFNet
import Tools

class MapViewController: GenericViewController {
    @IBOutlet weak var containerView: UIView!
    var url: URL?
    private var documentController: MapDocumentViewController?

    override func viewDidLoad() {
        documentController = MapDocumentViewController()
        if let documentController = documentController {
            self.embeed(documentController, inView: containerView)
    override func viewWillAppear(_ animated: Bool) {
        if let url = url {
            documentController?.openPDF(withURL: url)
    private func embeed(_ viewController: UIViewController, inView: UIView) {
        viewController.willMove(toParent: self)
        viewController.view.frame = view.bounds
        viewController.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
        viewController.didMove(toParent: self)

This is the embeeded VC:

import UIKit
import PDFNet
import Tools

class MapDocumentViewController: PTDocumentController {

    override func viewDidLoad() {
        self.toolGroupManager.selectedGroup = self.toolGroupManager.viewItemGroup
    func openPDF(withURL url: URL) {
        self.openDocument(with: url)

I have made a mistake when writing the title. I wanted to say tabbar instead of toolbar

Hi, thank you for getting back to us with more information.

The PTDocumentController view controller class uses its containing UINavigationController's bottom UIToolbar toolbar (.toolbar property) to show buttons, in the document controller’s .toolbarItems property, along the bottom of the document controller.

When you add the PTDocumentController as a child view controller, your MapDocumentViewController instance is the view controller on the UINavigationController's navigation stack, but because that map-document view controller itself does not have any items in its own .toolbarItems property, the UIToolbar is still shown but without any buttons.

If you only want to prevent the empty bottom toolbar from showing, you can set the document controller’s .hidesBottomBar property to false.