async compileCoverPage(novelData){

        const {name, cover, author} = novelData;
        const myRepos = "https://github.com/OxygenJam/node-novel-updates-scraper";
        const pdfkitLink = "http://pdfkit.org";

        try{

            this.doc.pipe(fs.createWriteStream(this.dir + formatNovelName(name) + ".pdf"));

            pretty.logPrint("Compiling novel cover page...");

            this.doc.fontSize(36)
                .text(name, {align:'center'})
                .moveDown()
                .fontSize(16)
                .text('By: '+ author, {align:'center'})
                .moveDown();
    
            this.doc.fontSize(8)
                .text('Created using ', {align:'center'})
                .fillColor('blue')
                .text('node-novel-updates-scraper ', {link:myRepos, underline:true, align: 'center'})
                .fillColor('black')
                .text('and ', {align:'center'})
                .fillColor('blue')
                .text('PDFkit', {link:pdfkitLink, align:'center', underline: true})
                .fillColor('black')
                .moveDown();

            this.doc.image(await bufferImageFromURL(cover), {width: 270, height: 400, align: "center"})
                .moveDown();

                pretty.logPrint("Nover cover page done.");
        }
        catch(err){

            errDict.customError(err);
            throw 23;

        }

    }
/**
     * This will compile the novel image and name in the PDF pipeline
     * 
     * @param {Object} novelData This is the object data containing the novel image and name
     * 
     * @throws The an error code when an exception occurs 
     */
This will compile the novel image and name in the PDF pipeline

@param {Object} novelData This is the object data containing the novel image and name

@throws The an error code when an exception occurs
This will compile the novel image and name in the PDF pipeline @param { Object } novelData This is the object data containing the novel image and name @throws The an error code when an exception occurs
async compileCoverPage(novelData){
        const {name, cover, author} = novelData;
        const myRepos = "https://github.com/OxygenJam/node-novel-updates-scraper";
        const pdfkitLink = "http://pdfkit.org";
        try{
            this.doc.pipe(fs.createWriteStream(this.dir + formatNovelName(name) + ".pdf"));
            pretty.logPrint("Compiling novel cover page...");
            this.doc.fontSize(36)
                .text(name, {align:'center'})
                .moveDown()
                .fontSize(16)
                .text('By: '+ author, {align:'center'})
                .moveDown();
            this.doc.fontSize(8)
                .text('Created using ', {align:'center'})
                .fillColor('blue')
                .text('node-novel-updates-scraper ', {link:myRepos, underline:true, align: 'center'})
                .fillColor('black')
                .text('and ', {align:'center'})
                .fillColor('blue')
                .text('PDFkit', {link:pdfkitLink, align:'center', underline: true})
                .fillColor('black')
                .moveDown();
            this.doc.image(await bufferImageFromURL(cover), {width: 270, height: 400, align: "center"})
                .moveDown();
                pretty.logPrint("Nover cover page done.");
        }
        catch(err){
            errDict.customError(err);
            throw 23;
        }
    }
async compileCoverPage ( novelData ) { const { name , cover , author } = novelData ; const myRepos = "https://github.com/OxygenJam/node-novel-updates-scraper" ; const pdfkitLink = "http://pdfkit.org" ; try { this . doc . pipe ( fs . createWriteStream ( this . dir + formatNovelName ( name ) + ".pdf" ) ) ; pretty . logPrint ( "Compiling novel cover page..." ) ; this . doc . fontSize ( 36 ) . text ( name , { align : 'center' } ) . moveDown ( ) . fontSize ( 16 ) . text ( 'By: ' + author , { align : 'center' } ) . moveDown ( ) ; this . doc . fontSize ( 8 ) . text ( 'Created using ' , { align : 'center' } ) . fillColor ( 'blue' ) . text ( 'node-novel-updates-scraper ' , { link : myRepos , underline : true , align : 'center' } ) . fillColor ( 'black' ) . text ( 'and ' , { align : 'center' } ) . fillColor ( 'blue' ) . text ( 'PDFkit' , { link : pdfkitLink , align : 'center' , underline : true } ) . fillColor ( 'black' ) . moveDown ( ) ; this . doc . image ( await bufferImageFromURL ( cover ) , { width : 270 , height : 400 , align : "center" } ) . moveDown ( ) ; pretty . logPrint ( "Nover cover page done." ) ; } catch ( err ) { errDict . customError ( err ) ; throw 23 ; } }
This will compile the novel image and name in the PDF pipeline
This will compile the novel image and name in the PDF pipeline