         
         _document = page.document
         
-        _documentHandle = _document!._documentHandle
+        _documentHandle = _document._documentHandle
     }
     
     internal func _cleanup() {

#endif
import Foundation

public final class DrawingContext {
    
    private weak var _document: PDFDocument?
    private var __page: HPDF_Page
    private var _documentHandle: HPDF_Doc
    private var _isInvalidated = false

        set {
            guard let font = HPDF_GetFont(_documentHandle, newValue.name, encoding.name) else {
                
                switch _document._error {
                case PDFError.invalidFontName:
                    preconditionFailure("Font \(newValue) must be loaded in the document using " +
                        "loadTrueTypeFont(from:embeddingGlyphData:) or " +
                        "loadTrueTypeFontFromCollection(from:index:embeddingGlyphData:) methods.")
                default:
                    preconditionFailure(_document._error.description)
                }
            }
            
