You are not logged in.

#1 2024-09-16 21:04:31

tombenko
Member
From: Balassagyarmat
Registered: 2013-08-24
Posts: 129

printing pdf fails when 2 on 1 set

Hay!
I tried to print a two sided pdf document with xpdf, evince and xreader with 2 pages on 1. All three failed the job, as the printer answered broken pdf sent. When I printed to a pdf file and tried to open it, I got corrupted pdf error.

When I printed 1 on 1, it occured errorless, so there must be a problem somewhere in creatiung the desired file. But where?

Offline

#2 2024-09-17 06:06:46

seth
Member
Registered: 2012-09-03
Posts: 60,780

Re: printing pdf fails when 2 on 1 set

When I printed to a pdf file and tried to open it, I got corrupted pdf error.

Can you print some generic simple pdf this way and share the resulting, bogus pdf?
Also https://wiki.archlinux.org/title/CUPS/T … #Debug_log - raise the debug level and check the log, there's probably some problem w/ one of the filters.

Offline

#3 2024-09-18 07:02:20

tombenko
Member
From: Balassagyarmat
Registered: 2013-08-24
Posts: 129

Re: printing pdf fails when 2 on 1 set

I can. Where can I upload it?

Offline

#4 2024-09-18 07:06:52

seth
Member
Registered: 2012-09-03
Posts: 60,780

Re: printing pdf fails when 2 on 1 set

cat weird.pdf | curl -F 'file=@-' 0x0.st

Offline

#5 2024-09-18 19:51:21

tombenko
Member
From: Balassagyarmat
Registered: 2013-08-24
Posts: 129

Re: printing pdf fails when 2 on 1 set

Offline

#6 2024-09-18 20:06:48

seth
Member
Registered: 2012-09-03
Posts: 60,780

Re: printing pdf fails when 2 on 1 set

That's a postscript document, no PDF?

ps2pdf X3OI.ps X3OI.pdf

converts it into a proper pdf, though. No errors (I guess, looks hungarian)

How do you "printed to a pdf file"?
https://archlinux.org/packages/extra/x86_64/cups-pdf/ ?

Offline

#7 2024-09-18 22:24:09

tombenko
Member
From: Balassagyarmat
Registered: 2013-08-24
Posts: 129

Re: printing pdf fails when 2 on 1 set

Uh-oh. It is saved as a pdf file. That must be the problem and that is why i can print the original file (which is a pdf), and not the converted one. Now the question is how to make xpdf convert to the proper file type.

Offline

#8 2024-09-19 07:03:57

seth
Member
Registered: 2012-09-03
Posts: 60,780

Re: printing pdf fails when 2 on 1 set

Saved how, why and why are you trying to use xpdf to convert files?
https://archlinux.org/packages/extra/x86_64/cups-pdf/ is a PDF printer, you an use cups to print any document into a PDF.

Also there should™ be no problem in printing a postscript file - and the extension is "should" …
irrelevant (you can save it as foo.jpg and it's still detected as application/postscript mime) - though I just tried

lp -d CUPS_PDF -o number-up=2 X3OI.pdf

and the bad extension actually throws off the cups filters sad

lp -d CUPS_PDF -o number-up=2 X3OI.ps

however prints perfectly fine (I assume, again - I can't read any of that wink

http://0x0.st/X34v.pdf

Offline

#9 2024-10-12 10:50:03

tombenko
Member
From: Balassagyarmat
Registered: 2013-08-24
Posts: 129

Re: printing pdf fails when 2 on 1 set

I don't want to convert files using xpdf. The document I try to print is cinverted by it. Then CUPS gets the converted file, looks pdf but contains ps and being confused. (Yeah, thats an exercise sheet for school... smile )

Offline

#10 2024-10-12 13:52:33

seth
Member
Registered: 2012-09-03
Posts: 60,780

Re: printing pdf fails when 2 on 1 set

I don't want to convert files using xpdf.

Now the question is how to make xpdf convert to the proper file type.

The document I try to print is cinverted by it.

How and when, what's the origin?
Or are you trying to print a pdf w/ xpdf? Then how do you end up with the corrupted file?

If you already have a PDF, you can print that w/ lp, no gui client etc. required.

Please list your desired workflow "I start with [fill in the missing steps] and then I'm trying to print this file"

Offline

#11 2024-10-15 06:29:46

tombenko
Member
From: Balassagyarmat
Registered: 2013-08-24
Posts: 129

Re: printing pdf fails when 2 on 1 set

I exactly tried to print two pages on one side. The original document is already a PDF file, i edited it with LaTeX. When I send it to the printer, I get that error of filter failing.

  1. I open the file with xpdf

  2. Open the printer settings

  3. Coose the 2to1 option in the list

  4. Set the number of papaers

  5. Start the printing.

I didn't make any configuration for xpdf, it works with the stock conf files.

Offline

#12 2024-10-15 06:59:58

seth
Member
Registered: 2012-09-03
Posts: 60,780

Re: printing pdf fails when 2 on 1 set

Can you please upload the original file?
2:1 printing is a cups flag (see #8 "number-up=2"), xpdf should™ not do anything to the document.

Last edited by seth (2024-10-15 07:00:12)

Offline

#13 2024-10-15 18:26:25

tombenko
Member
From: Balassagyarmat
Registered: 2013-08-24
Posts: 129

Re: printing pdf fails when 2 on 1 set

Offline

#14 2024-10-15 19:09:47

seth
Member
Registered: 2012-09-03
Posts: 60,780

Re: printing pdf fails when 2 on 1 set

The file is ok.
xpdf indeed saves a PS if you say "print to file" in the printer dialog.
The CPUS-PDF printer settings allow me to save "2 (2x1)" pages per sheet, but that doesn't result in an n-up print.

lp -d CUPS_PDF -o number-up=2  /tmp/XIoH.pdf

results with what you likely want and I assume that'll also work w/ your local paperwaster instead of CUPS_PDF?

lpstat -v

will show you your printers.

Offline

Board footer

Powered by FluxBB