"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[71914],{3905:(e,r,t)=>{t.d(r,{Zo:()=>l,kt:()=>d});varn=t(67294);functionp(e,r,t){returnrine?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}functioni(e,r){vart=Object.keys(e);if(Object.getOwnPropertySymbols){varn=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){returnObject.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}returnt}functiono(e){for(varr=1;r<arguments.length;r++){vart=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){p(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}returne}functiona(e,r){if(null==e)return{};vart,n,p=function(e,r){if(null==e)return{};vart,n,p={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(p[t]=e[t]);returnp}(e,r);if(Object.getOwnPropertySymbols){vari=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(p[t]=e[t])}returnp}vars=n.createContext({}),c=function(e){varr=n.useContext(s),t=r;returne&&(t="function"==typeofe?e(r):o(o({},r),e)),t},l=function(e){varr=c(e.components);returnn.createElement(s.Provider,{value:r},e.children)},f={inlineCode:"code",wrapper:function(e){varr=e.children;returnn.createElement(n.Fragment,{},r)}},u=n.forwardRef((function(e,r){vart=e.components,p=e.mdxType,i=e.originalType,s=e.parentName,l=a(e,["components","mdxType","originalType","parentName"]),u=c(t),d=p,g=u["".concat(s,".").concat(d)]||u[d]||f[d]||i;returnt?n.createElement(g,o(o({ref:r},l),{},{components:t})):n.createElement(g,o({ref:r},l))}));functiond(e,r){vart=arguments,p=r&&r.mdxType;if("string"==typeofe||p){vari=t.length,o=newArray(i);o[0]=u;vara={};for(varsinr)hasOwnProperty.call(r,s)&&(a[s]=r[s]);a.originalType=e,a.mdxType="string"==typeofe?e:p,o[1]=a;for(varc=2;c<i;c++)o[c]=t[c];returnn.createElement.apply(null,o)}returnn.createElement.apply(null,t)}u.displayName="MDXCreateElement"},21283:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>s,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>a,toc:()=>c});varn=t(87462),p=(t(67294),t(3905));consti={sidebar_label:"PDFOptions.preferCSSPageSize"},o="PDFOptions.preferCSSPageSize property",a={unversionedId:"api/puppeteer.pdfoptions.prefercsspagesize",id:"version-17.0.0/api/puppeteer.pdfoptions.prefercsspagesize",title:"PDFOptions.preferCSSPageSize property",description:"Give any CSS @page size declared in the page priority over what is declared in the width or height or format option.",source:"@site/versioned_docs/version-17.0.0/api/puppeteer.pdfoptions.prefercsspagesize.md",sourceDirName:"api",slug:"/api/puppeteer.pdfoptions.prefercsspagesize",permalink:"/api/puppeteer.pdfoptions.prefercsspagesize",draft:!1,tags:[],version:"17.0.0",frontMatter:{sidebar_label:"PDFOptions.preferCSSPageSize"},sidebar:"sidebar",previous:{title:"PDFOptions.path",permalink:"/api/puppeteer.pdfoptions.path"},next:{title:"PDFOptions.printBackground",permalink:"/api/puppeteer.pdfoptions.printbackground"}},s={},c=[],l={toc:c};functionf(e){let{components:r,...t}=e;return(0,p.kt)("wrapper",(0,n.Z)({},l,t,{components:r,mdxType:"MDXLayout"}),(0,p.kt)("h1",{id:"pdfoptionsprefercsspagesize-property"},"PDFOptions.preferCSSPageSize property"),(0,p.kt)("p",null,"Give any CSS ",(0,p.kt)("inlineCode",{parentName:"p"},"@page")," size declared in the page priority over what is declared in the ",(0,p.kt)("inlineCode",{parentName:"p"},"width")," or ",(0,p.kt)("inlineCode",{parentName:"p"},"height")," or ",(0,p.kt)("inlineCode",{parentName:"p"},"format")," option."),(0,p.kt)("p",null,(0,p.kt)("strong",{parentName:"p"},"Signature:")),(0,p.kt)("pre",null,(0,p.kt)("code",{parentName:"pre",className:"language-typescript"},"interface PDFOptions {\n preferCSSPageSize?: boolean;\n}\n")))}f.isMDXComponent=!0}}]);