Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: configuring zathura's print preview

73 views
Skip to first unread message

Charles Curley

unread,
Jul 8, 2023, 7:00:06 PM7/8/23
to
On Sat, 8 Jul 2023 13:35:43 -0700
Paul Scott <waterho...@aol.com> wrote:

> Can someone please direct me to documentation for or tell me how to
> set what program does print preview for Zathura?  I would Zathura
> would be a possibility.

charles@jhegaala:~$ apt-cache show zathura | grep -i homepage
Homepage: https://pwmt.org/projects/zathura
charles@jhegaala:~$


>
> My problem is discovering whether a PDF will fit well enough on an
> 8"x11" sheet of paper.

Most PDF viewers will let you see the properties, which should include
the page size. And, depending on your printer software (CUPS on
Debian), you may be able to scale a document.

--
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

Brian

unread,
Jul 9, 2023, 7:50:06 AM7/9/23
to
On Sat 08 Jul 2023 at 22:28:52 -0700, Paul Scott wrote:

>
> On 7/8/23 3:58 PM, Charles Curley wrote:
> > On Sat, 8 Jul 2023 13:35:43 -0700
> > Paul Scott <waterho...@aol.com> wrote:
> >
> > > Can someone please direct me to documentation for or tell me how to
> > > set what program does print preview for Zathura?  I would Zathura
> > > would be a possibility.
> > charles@jhegaala:~$ apt-cache show zathura | grep -i homepage
> > Homepage: https://pwmt.org/projects/zathura
> > charles@jhegaala:~$
> Thank you!
> >
> > > My problem is discovering whether a PDF will fit well enough on an
> > > 8"x11" sheet of paper.
> > Most PDF viewers will let you see the properties, which should include
> > the page size. And, depending on your printer software (CUPS on
> > Debian), you may be able to scale a document.
> >
> So far I have found the Zathura "info" command but it doesn't tell me the
> page size.

Install poppler-utils and use pdfinfo and pdffonts.

> The print dialog does indeed give me the ability to scale.
>
> Another problem I am now having looks like a missing font. Zathura displays
> the document (music) fine but when I print (CUPS) some of the graphical
> information is missing.

The file displayed by zathura is not the file that is sent to the printing
system. The latter can be viewed by using Print to File.

The print dialog converts your PDF to a new PDF with Cairo Graphics. Scaling
is also done by Cairo Graphics. CUPS is not involved.

--
Brian.

Brian

unread,
Jul 9, 2023, 3:10:06 PM7/9/23
to
On Sun 09 Jul 2023 at 10:42:52 -0700, Paul Scott wrote:

> On 7/9/23 4:40 AM, Brian wrote:

[...]

> > The file displayed by zathura is not the file that is sent to the printing
> > system. The latter can be viewed by using Print to File.
> >
> > The print dialog converts your PDF to a new PDF with Cairo Graphics. Scaling
> > is also done by Cairo Graphics. CUPS is not involved.
>
> That's good to know and seems somewhat illogical!  Would it be reasonable to
> ask if you know why?

Zathura uses the GTK print dialog, as do many other applications. GTK has
to deal with a variety of file formats that the application can dispay.

Let's take firefox. It can display html files. Sending an html file to
the printing system is a recipe for disappointment (usually). CUPS is
unable to process and render it as displayed. GTK produces a PDF of the
page. CUPS is happy.

The same comment also applies to PNG files.

> Pdffonts does indeed tell me that there are illegal characters in the PDF
> created by Print to File.
>
> Now that I know that the paper size is correct I see that "lp" prints my
> file perfectly.

The fonts are embedded in the original PDF. CUPS prints what it is given.

> If the file were not the correct size I would have liked to use the scaling
> and page choices in the print dialog.
>
> Does
>
> lp -o "letter"
>
> scale the document?

This is an option unknown to CUPS. It will be ignored.

--
Brian.

debia...@howorth.org.uk

unread,
Jul 9, 2023, 3:20:05 PM7/9/23
to
I don't use lp very much but according to
https://www.cups.org/doc/options.html#OPTIONS

$ lp -o fit-to-page -o media=Letter filename

should do what the OP wants.

Brian

unread,
Jul 10, 2023, 8:10:06 AM7/10/23
to
On Sun 09 Jul 2023 at 12:31:21 -0700, Paul Scott wrote:

>
> On 7/9/23 12:00 PM, Brian wrote:
> > On Sun 09 Jul 2023 at 10:42:52 -0700, Paul Scott wrote:
>
> (snip)
>
> Does
> > > lp -o "letter"
> > >
> > > scale the document?
> > This is an option unknown to CUPS. It will be ignored.
>
> I found that in man lp

Look carefully. I think you mean

lp -o media=letter

This sets the page size and does not do scaling.

--
Brian.

David Wright

unread,
Jul 10, 2023, 4:10:06 PM7/10/23
to
On Mon 10 Jul 2023 at 10:41:36 (-0700), Paul Scott wrote:
> On 7/10/23 5:06 AM, Brian wrote:
> > Look carefully. I think you mean
> >
> > lp -o media=letter
> >
> > This sets the page size and does not do scaling.
> >
> Of course you're correct.  My mistake.
>
> This still leaves me with finding a way to scale.  I'm sure there are
> several PDF tools that do it and I will use those when whichever print
> dialog Zathura uses fails me with font problems.

I use pdfjam from texlive-extra-utils. It can scale, shift, rotate,
etc. It has rather a lot of options, so I use it through scripts.
Commandline recall (ie readline) is also useful for trial and error.

https://github.com/rrthomas/pdfjam

https://github.com/rrthomas/pdfjam/blob/master/pdfjam-help.txt

Cheers,
David.

Brian

unread,
Jul 11, 2023, 3:10:07 PM7/11/23
to
I do not use anything for scaling, but pdfarranger offers the facility.
GUI only.

--
Brian.

Curt

unread,
Jul 14, 2023, 12:40:07 PM7/14/23
to
On 2023-07-11, Brian <ad...@cityscape.co.uk> wrote:
>>
>> https://github.com/rrthomas/pdfjam
>>
>> https://github.com/rrthomas/pdfjam/blob/master/pdfjam-help.txt
>
> I do not use anything for scaling, but pdfarranger offers the facility.
> GUI only.
>



--scale 0.7 (to scale all input pages to 70% size)
0 new messages