GVIM paper size

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

GVIM paper size

Samba - linux mailing list
I am typing in this graphical version of the Vim text editor.
https://lists.samba.org/archive/linux/2017-August/036302.html

But when I print, my printer objects, saying that US letter sized paper
was requested. How can I stop this problem, which seems unique to GVIM?
--
www.netspeed.com.au/bryan/

--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux
Reply | Threaded
Open this post in threaded view
|

Re: GVIM paper size

Samba - linux mailing list


On 22/08/17 20:14, Bryan Kilgallin (iiNet) via linux wrote:
> I am typing in this graphical version of the Vim text editor.
> https://lists.samba.org/archive/linux/2017-August/036302.html
>
> But when I print, my printer objects, saying that US letter sized paper
> was requested. How can I stop this problem, which seems unique to GVIM?


I'm guessing you read the fine documentation?

What does:-
less /etc/papersize
say?

:)



Kind regards

--
    A: Because we read from top to bottom, left to right.
    Q: Why should I start my reply below the quoted text?

    A: Because it messes up the order in which people normally read text.
    Q: Why is top-posting such a bad thing?

    A: The lost context.
    Q: What makes top-posted replies harder to read than bottom-posted?

    A: Yes.
    Q: Should I trim down the quoted part of an email to which I'm reply

http://www.idallen.com/topposting.html

--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux
Reply | Threaded
Open this post in threaded view
|

Re: GVIM paper size

Samba - linux mailing list
Indeed, Scott:

>> I am typing in this graphical version of the Vim text editor.
>> https://lists.samba.org/archive/linux/2017-August/036302.html
>>
>> But when I print, my printer objects, saying that US letter sized paper
>> was requested. How can I stop this problem, which seems unique to GVIM?
>
>
> I'm guessing you read the fine documentation?

I now have in GVIM the following window open.
{
option-window (~) - GVIM1
}

Of which, section 11 says the following.

{
11 printing

printoptions list of items that control the format of :hardcopy output
  set popt=paper:a4
printdevice name of the printer to be used for :hardcopy
  set pdev=
printexpr expression used to print the PostScript file for :hardcopy
  set pexpr=system('lpr'\ .\ (&printdevice\ ==\ ''\ ?\ ''\ :\ '\ -P'\
.\ &printdevice)\ .\ '\ '\ .\ v:fname_in)\ .\ delete(v:fname_in)\ +\
v:shell_error
printfont name of the font to be used for :hardcopy
  set pfn=courier
printheader format of the header used for :hardcopy
  set pheader=%<%f%h%m%=Page\ %N
printencoding encoding used to print the PostScript file for :hardcopy
  set penc=
printmbcharset the CJK character set to be used for CJK output from
:hardcopy
  set pmbcs=
printmbfont list of font names to be used for CJK output from :hardcopy
  set pmbfn=
}

> What does:-
> less /etc/papersize
> say?

"a4"
--
www.netspeed.com.au/bryan/

--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux
Reply | Threaded
Open this post in threaded view
|

Re: GVIM paper size

Samba - linux mailing list


On 22/08/17 21:31, Bryan Kilgallin (iiNet) via linux wrote:

> Indeed, Scott:
>
>>> I am typing in this graphical version of the Vim text editor.
>>> https://lists.samba.org/archive/linux/2017-August/036302.html
>>>
>>> But when I print, my printer objects, saying that US letter sized paper
>>> was requested. How can I stop this problem, which seems unique to GVIM?
>>
>>
>> I'm guessing you read the fine documentation?
>
> I now have in GVIM the following window open.
> {
> option-window (~) - GVIM1
> }
>
> Of which, section 11 says the following.
>
> {
> 11 printing
>
> printoptions    list of items that control the format of :hardcopy output
>      set popt=paper:a4
> printdevice    name of the printer to be used for :hardcopy
>      set pdev=
> printexpr    expression used to print the PostScript file for :hardcopy
>      set pexpr=system('lpr'\ .\ (&printdevice\ ==\ ''\ ?\ ''\ :\ '\ -P'\
> .\ &printdevice)\ .\ '\ '\ .\ v:fname_in)\ .\ delete(v:fname_in)\ +\
> v:shell_error
> printfont    name of the font to be used for :hardcopy
>      set pfn=courier
> printheader    format of the header used for :hardcopy
>      set pheader=%<%f%h%m%=Page\ %N
> printencoding    encoding used to print the PostScript file for :hardcopy
>      set penc=
> printmbcharset    the CJK character set to be used for CJK output from
> :hardcopy
>      set pmbcs=
> printmbfont    list of font names to be used for CJK output from :hardcopy
>      set pmbfn=
> }
>
>> What does:-
>> less /etc/papersize
>> say?
>
> "a4"

That is the default page size - check your printer settings as something
is over-riding the Vi(m) page size settings.


Kind regards


--
    A: Because we read from top to bottom, left to right.
    Q: Why should I start my reply below the quoted text?

    A: Because it messes up the order in which people normally read text.
    Q: Why is top-posting such a bad thing?

    A: The lost context.
    Q: What makes top-posted replies harder to read than bottom-posted?

    A: Yes.
    Q: Should I trim down the quoted part of an email to which I'm reply

http://www.idallen.com/topposting.html

--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux
Reply | Threaded
Open this post in threaded view
|

Re: GVIM paper size

Samba - linux mailing list
I'm puzzled, Scott:

>>> What does:-
>>> less /etc/papersize
>>> say?
>>
>> "a4"
>
> That is the default page size - check your printer settings as something
> is over-riding the Vi(m) page size settings.

"lp" results in the printer complaining that it wants US-letter paper!

"locale2papersize" contains the following.

{
#!/bin/sh -e
#
# locale2papersize outputs the paper size "a4" or "letter" based on
# the height and width in the locale that is passed as an argument.

export LC_PAPER=$1

height=$( locale height )
width=$( locale width )

if [ "$height" = 279 -a "$width" = 216 ]; then
     size=letter
else
     size=a4
fi

echo $size
}

But "locale" yields this.

{
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en_GB:en
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC=en_AU.UTF-8
LC_TIME=en_AU.UTF-8
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY=en_AU.UTF-8
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER=en_AU.UTF-8
LC_NAME=en_AU.UTF-8
LC_ADDRESS=en_AU.UTF-8
LC_TELEPHONE=en_AU.UTF-8
LC_MEASUREMENT=en_AU.UTF-8
LC_IDENTIFICATION=en_AU.UTF-8
LC_ALL=
}
--
www.netspeed.com.au/bryan/

--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux
Reply | Threaded
Open this post in threaded view
|

Re: GVIM paper size

Samba - linux mailing list
In reply to this post by Samba - linux mailing list
Thanks again, Scott:

>>> What does:-
>>> less /etc/papersize
>>> say?
>>
>> "a4"
>
> That is the default page size - check your printer settings as something
> is over-riding the Vi(m) page size settings.

In Ubuntu's System Settings, All Settings window, I selected the
Printers icon. Then in the Printers window, I Opening the Brother icon.
Revealing its Printer Properties window. Selecting Printer Options,
showed a General list of settings. Unfortunately the Media Size list
seems fixated on "Letter". As when I choose "A4" and click
"Apply"--Media Size reverts to Letter!
--
www.netspeed.com.au/bryan/

--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux
Reply | Threaded
Open this post in threaded view
|

Re: GVIM paper size

Samba - linux mailing list
> In Ubuntu's System Settings, All Settings window, I selected the
> Printers icon. Then in the Printers window, I Opening the Brother icon.
> Revealing its Printer Properties window. Selecting Printer Options,
> showed a General list of settings. Unfortunately the Media Size list
> seems fixated on "Letter". As when I choose "A4" and click
> "Apply"--Media Size reverts to Letter!

I updated the printer's drivers. In Ubuntu's Printers window a different
icon appears. Which I selected as default, deleting the old one. In
Printer Options, General, Media Size now remains set to A4. Tests
printing from GVIM and Terminal both worked fine!
--
www.netspeed.com.au/bryan/

--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux