Error importing pdf file with multiple pages

Hello,
I’m using Rhino 7 and I try building my own commands often in python and I’m having trouble with the native Import command of Rhino with multiple-pages pdf files.
When you simply type Import in the command prompt and select the file you get a pop-up asking which pages you want to import and you have a “All pages” option which works fine.
When you type -Import in the command prompt and select the file, you get as expected the same question but in the command prompt and the option displayed is “Page number to import <1-2>:” for example, but I don’t have the “All pages” option.
I tried both typing “1-2” (equals to -1 which not a valid input) or hitting Enter which causes “Error reading file – Command was canceled”.

So my question is a 2 part question :

  • how do you input the “All Pages” option from command line ?
  • Is there a way to create a generic input command that would work both for single page and multiple page pdf files ? If not I would need to know the number of pages compposing the file in advance…

Thanks for your help

Edit : I get the exact same behavior in Rhino WIP

Hi Thomas -I see that - Enter should work there to get the default but does not. Thanks for the report.
RH-75099 Import multipage pdf not scriptable

-Pascal

1 Like