Saving mail-merged document with "long URL" breaks PDF production as shown on picture below.
Ad-hoc solution on my side is to add space within URL so your routines can render within page margins. Otherwise if no breaks in URL the Exception is thrown and no PDF saved.