/*
 * SDK Pullenti Unitext, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software. 
 * This class is generated using the converter UniSharping (www.unisharping.ru) from Pullenti C# project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

const Utils = require("./../../../unisharp/Utils");

const PdfObject = require("./PdfObject");

class PdfReference extends PdfObject {
    
    toStringEx(lev) {
        return ("[R 0 " + this.id + "]");
    }
    
    write(s) {
        let buf = Utils.encodeString("ASCII", (String(this.writeId) + " 0 R"));
        s.write(buf, 0, buf.length);
    }
    
    getAllReferences(refs, ids) {
        refs.push(this);
    }
    
    static _new184(_arg1, _arg2) {
        let res = new PdfReference();
        res.writeId = _arg1;
        res.id = _arg2;
        return res;
    }
    
    static _new186(_arg1) {
        let res = new PdfReference();
        res.writeId = _arg1;
        return res;
    }
}


module.exports = PdfReference