PDF from clipboard

I’m trying to make a script that creates a new PDF document after I have copied some pages from an other PDF (like menu command New – With Clipboard).

This line creates a PDF document in specified group, but the content says ‘No File’. How do I set the data to clipboard?

set new_pdf to (create record with {type:PDF document, name:the_name, data:clipboard} in item 1 of targetgroup)

Figured out an other way:

paste clipboard to (item 1 of targetgroup)
set target_file to (theLocation & "/" & («data utxt2710» Unicode text)) as string
set new_pdf to (get record at target_file in current database)

This should be sufficient:

set new_pdf to paste clipboard to (item 1 of targetgroup)