From 55b7371d07a80e1f6ea2f1569bf02768e55e7b01 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Thu, 4 Aug 2022 18:43:35 +0200 Subject: [PATCH] more --- cpdfaddtext.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpdfaddtext.ml b/cpdfaddtext.ml index 547cb12..2c4a350 100644 --- a/cpdfaddtext.ml +++ b/cpdfaddtext.ml @@ -380,6 +380,7 @@ let addtext let unique_fontname = Pdf.unique_key "F" fontdict in let ops, urls = let text = process_text time text (replace_pairs pdf filename bates batespad num page) in + let text = hd (fst (get_urls [text])) in let calc_textwidth text = match font with | Some f -> @@ -419,7 +420,7 @@ let addtext process_text time text (replace_pairs pdf filename bates batespad num page)) lines in - let expanded_lines, urls = + let expanded_lines, urls = (* process URLs for justification too *) get_urls expanded_lines in let textwidth = calc_textwidth text