How do you create a single-page PDF from a web archive using AppleScript? I’m trying to accomplish the same thing as clicking this contextual menu item:
The following command only appears to accept URLs:
create PDF document from v : Create a new PDF document with or without pagination from a web resource.
create PDF document from text : The URL to download.
[agent text] : The user agent.
[in record] : The destination group for the new record. Uses incoming group or group selector if not specified.
[name text] : The name for the new record.
[pagination boolean] : Paginate PDF document or not.
[readability boolean] : Declutter page layout.
[referrer text] : The HTTP referrer.
[width integer] : The preferred width for the PDF document in pixels.
Records, tabs, and think windows all have a paginated PDF property but not a single-page PDF property:
paginated PDF (any, r/o) : A printed/converted PDF of the record.
Tabs and think windows appear to have an unpaginated PDF property:
PDF (any, r/o) : A PDF without pagination of the visible document retaining the screen layout.
Is this what I’m looking for? It seems odd that this this is a property of a tab or a window but not of a record itself.
Update: It appears that the convert command can create PDFs:
convert v : Convert a record to plain or rich text, formatted note or HTML and create a new record afterwards.
record record : The record to convert.
[in record] : The destination group for the converted record. Parents of the record to convert are used if not specified.
[to html/markdown/note/PDF document/PDF without annotations/rich/simple/webarchive] : The desired format (default simple).
Unfortunately, this will create a paginated PDF document. Any other ideas?