XPCE PDF function

I’m using: SWI-Prolog version 10.0.2

I want the code to: print a XPCE picture

But what I’m getting is: not enogh parameters for PDF, only prints the visible part of the picture, not the full picture

My code looks like this:

save(Frame) :-> %saving as pdf
get(Frame, member, picture, Pic),
get(Pic,member,name,Name),
string_concat(Name,‘.pdf’,FileName),
send(Pic, pdf(FileName,1)).

% your code here