I want the root Go package to expose a one-shot HTML-to-PDF conversion API. The simple call should be HtmlToPdf(target io.Writer, htmlContent ContentInput, fontConfig text.FontConfiguration) error, where ContentInput accepts the package's public InputString, InputReader, InputFilename, and InputUrl forms. For example, calling HtmlToPdf(&buf, InputString("<html><body><h1>Hello</h1></body></html>"), fontConfig) should return nil, write non-empty bytes to buf, and those bytes should be a readable PDF document. Calling the same function with InputReader(strings.NewReader("<p>Reader input</p>")) should likewise return nil and write a valid PDF to the supplied writer.
I also need the configurable form HtmlToPdfOptions(target io.Writer, htmlContent ContentInput, baseUrl string, urlFetcher utils.UrlFetcher, mediaType string, stylesheets []tree.CSS, presentationalHints bool, fontConfig text.FontConfiguration, zoom float64, attachments []backend.Attachment) error. It should parse the HTML input with the provided base URL, resource fetcher, and media type, render it with the supplied stylesheets and presentational-hints setting, apply the requested zoom, include any supplied attachments, then serialize the resulting PDF to target. Passing empty strings, nil fetcher/stylesheets/attachments, false presentational hints, and zoom 1 should behave like HtmlToPdf. If parsing the HTML input or resolving its resources fails, the function should return that error and not pretend the conversion succeeded.