title: How to pass special parameters from the CLI to the browser URL bar
body: <p>I have a problem passing special parameters from a bash script to a browser URL bar.</p>
  <p>I would like to open a PDF file on a certain page, and with a certain zoom factor, and at a certain position (relative to a page corner, I think that's called &quot;focus&quot;) in Brave, from the command line.</p>
  <p>I thought that should work like this:</p>
  <p><em><strong>$ brave-browser file:/home/user/foo.pdf#page=5&amp;zoom=150,50,50</strong></em></p>
  <p>(the &quot;,50,50&quot; would be the &quot;focus&quot;) but it doesn't. It just provokes an error message.</p>
  <p>Copy/pasting the entire line with all the special characters manually to the URL bar works fine, but I would like to do that without the mouse or keyboard, from the CL. In other words, copying the string</p>
  <p><em><strong>file:/home/user/foo.pdf#page=5&amp;zoom=150,50,50</strong></em></p>
  <p>and pasting that straight into the URL bar will open the file the way I want in Brave.</p>
  <p>This shortened command works from the CL:
  <em><strong>$ brave-browser file:/home/user/foo.pdf#page=5</strong></em>
  but adding the &amp;zoom=150,50,50 provokes an error message from Brave.</p>
  <p>I just can't get my head around how to format the rest of the line so that the file opens in the browser as intended (zoomed and focussed), when called from the CL.</p>
  <p>I begin to wonder if that is possible at all.</p>
  <p>I have tried everything that was suggested here:
  <a href="https://stackoverflow.com/questions/38147620/shell-script-to-open-a-url">Shell script to open a URL</a>
  and a couple of other ideas I had (mainly, creative use of quotation marks)</p>
  <p>I also read this, but I am not sure if it refers to the same question - and the post is 11 years old. Was hoping that things changed:
  <a href="https://stackoverflow.com/questions/1865600/can-a-website-pass-focus-to-the-browsers-url-field">Can a website pass focus to the browsers url field?</a></p>
  <p>Thanks a lot for any help!</p>