HtmlToPdfConverterPrintLikeChrome Method
Renders the HTML the way the Chrome browser prints it to PDF: print media type, margins of 1 cm
on each side and no background colors or images
Namespace: EvoPdf.NextAssembly: EvoPdf.Next (in EvoPdf.Next.dll) Version: 14.75.0
public void PrintLikeChrome(
PdfPageSize pageSize,
PdfPageOrientation orientation = PdfPageOrientation.Portrait
)
Parameters
- pageSize PdfPageSize
- The page size
- orientation PdfPageOrientation (Optional)
- Portrait or landscape
The margins,
PrintBackgrounds and the other options can be changed after the call; for example,
setting PrintBackgrounds to true keeps the background colors and images, like the Background graphics
option of Chrome.
Setting
HtmlViewerZoom or
HtmlViewerWidth after the call ends the automatic layout: the values
set are used as they are, without adjusting them to the page, until a layout method is called again.
The layouts for the usual cases are described in the "HTML to PDF Page Setup and Scaling" topic:
HTML to PDF Page Setup and Scaling