puppeteer/assets/js/61d90281.f9e95c76.js

1 line
3.9 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[73516],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>d});var n=r(67294);function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t){if(null==e)return{};var r,n,p=function(e,t){if(null==e)return{};var r,n,p={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(p[r]=e[r]);return p}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(p[r]=e[r])}return p}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},l=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,p=e.mdxType,i=e.originalType,s=e.parentName,l=a(e,["components","mdxType","originalType","parentName"]),u=c(r),d=p,g=u["".concat(s,".").concat(d)]||u[d]||f[d]||i;return r?n.createElement(g,o(o({ref:t},l),{},{components:r})):n.createElement(g,o({ref:t},l))}));function d(e,t){var r=arguments,p=t&&t.mdxType;if("string"==typeof e||p){var i=r.length,o=new Array(i);o[0]=u;var a={};for(var s in t)hasOwnProperty.call(t,s)&&(a[s]=t[s]);a.originalType=e,a.mdxType="string"==typeof e?e:p,o[1]=a;for(var c=2;c<i;c++)o[c]=r[c];return n.createElement.apply(null,o)}return n.createElement.apply(null,r)}u.displayName="MDXCreateElement"},61030:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var n=r(87462),p=(r(67294),r(3905));const i={sidebar_label:"PDFOptions.preferCSSPageSize"},o="PDFOptions.preferCSSPageSize property",a={unversionedId:"api/puppeteer.pdfoptions.prefercsspagesize",id:"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/../docs/api/puppeteer.pdfoptions.prefercsspagesize.md",sourceDirName:"api",slug:"/api/puppeteer.pdfoptions.prefercsspagesize",permalink:"/next/api/puppeteer.pdfoptions.prefercsspagesize",draft:!1,tags:[],version:"current",frontMatter:{sidebar_label:"PDFOptions.preferCSSPageSize"},sidebar:"sidebar",previous:{title:"PDFOptions.path",permalink:"/next/api/puppeteer.pdfoptions.path"},next:{title:"PDFOptions.printBackground",permalink:"/next/api/puppeteer.pdfoptions.printbackground"}},s={},c=[],l={toc:c};function f(e){let{components:t,...r}=e;return(0,p.kt)("wrapper",(0,n.Z)({},l,r,{components:t,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}}]);