                 setTimeout((()->img.attr('src',url)), 2000)
             img.on('error', load_error)
 
+            if recenter
+                img.one 'load', () =>
+                    @recenter()
+
             if @zoom_width?
                 max_width = @zoom_width
-                margin_left = "#{-(max_width-100)/2}%"
                 max_width = "#{max_width}%"
                 img.css
                     'max-width'   : max_width
                     width         : max_width
-                    'margin-left' : margin_left
 
             #page.find(".salvus-editor-pdf-preview-text").text(p.text)
         cb()

                'max-width'   : max_width
                width         : max_width
            @scroll_into_view(n : n, highlight_line:false, y:$(window).height()/2)

    watch_scroll: () =>
        if @_f?

        if opts.delta?
            if not @zoom_width?
                @zoom_width = 160   # NOTE: hardcoded also in editor.css class .salvus-editor-pdf-preview-image
            max_width = @zoom_width
            max_width += opts.delta
        else if opts.width?
            max_width = opts.width
