Skip to content

Question: headless use #6

@RichardHB9

Description

@RichardHB9

Thank you for this great example. Is it possible to generate PDF from HTML+CSS+JavaScript headless, without first made it visible in WKWebView? Without showing anything, just read HTML file to invisible WKWebView then create and save PDF? If I'm using:

func render(htmlURL: URL,
toPDF pdfURL: URL,
paperSize: PaperSize,
paperMargins: UIEdgeInsets = .zero,
delegate: HTML2PDFRendererDelegate? = nil,
callback: @escaping Callback = {_, _ in})

it creates empty PDF.

Thank you.
Richard

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions