<s> '''<STR_LIT>''' <EOL> import sys <EOL> import os <EOL> from pdfrw import PdfReader , PdfWriter <EOL> from pdfrw . findobjs import page_per_xobj <EOL> inpfn , = sys . argv [ <NUM_LIT:1> : ] <EOL> outfn = '<STR_LIT>' + os . path . basename ( inpfn ) <EOL> pages = list ( page_per_xobj ( PdfReader ( inpfn ) . pages , margin = <NUM_LIT:0.5> * <NUM_LIT> ) ) <EOL> if not pages : <EOL> raise IndexError ( "<STR_LIT>" ) <EOL> writer = PdfWriter ( ) <EOL> writer . addpages ( pages ) <EOL> writer . write ( outfn ) </s>
