remarkable_printer icon indicating copy to clipboard operation
remarkable_printer copied to clipboard

Clean files up on PDF receive fail

Open ershov opened this issue 1 year ago • 11 comments

After printing, systemctl says that the service is failed.

I ran /home/root/bin/printer.arm -debug via ssh and printed a document. After a lot of (supposedly, postscript) output, it said Couldn't find PDF start and exited with error code 130.

It creates zero-sized files in /home/root/.local/share/remarkable/xochitl.

ershov avatar Feb 01 '25 20:02 ershov

I need to see the log with -debug on to know what the content looks like. My guess is that you're sending Postscript data instead of PDF data. This tool only supports PDF data (starts with %PDF-X.Y).

Evidlo avatar Feb 01 '25 20:02 Evidlo

Debugging enabled
Listening on 0.0.0.0:9100
Saving PDF to: /home/root/.local/share/remarkable/xochitl/f56f5df6-8536-47d8-a89a-d561338ebcd0.pdf
%!PS-Adobe-3.0
%APL_DSC_Encoding: UTF8
%APLProducer: (Version 13.4.1 (Build 22F82) Quartz PS Context)
%%Title: (Untitled)
%%Creator: (iTerm2: cgpdftops CUPS filter)
%%CreationDate: (Sunday, February 02 2025 08:15:06 AEDT)

..........

(!)s
ep
end
%%Trailer
%%Pages: 1
%%BoundingBox: 0 0 595 842
%%EOF
D
Couldn't find PDF start

This is definitely PostScript, not PDF. Did I install printer incorrectly?

ershov avatar Feb 01 '25 21:02 ershov

Also, when adding a printer, it fails multiple times.

Once, with empty input, another time, with this:

Debugging enabled
Listening on 0.0.0.0:9100
Saving PDF to: /home/root/.local/share/remarkable/xochitl/87276b1d-8762-44dc-98c2-f891b1f5a1ef.pdf
%!PS-Adobe-3.0 Query
userdict(\004)cvn{(\004) print flush}put
%%?BeginFeatureQuery: *?APOptionalDuplexer

	save
	currentpagedevice /Duplex known
	{(True)}{(False)}ifelse = flush
	restore

%%?EndFeatureQuery: Unknown

%%EOF
D
Couldn't find PDF start

I think the tool needs first to make sure there is something to save, then create a file for that.

ershov avatar Feb 01 '25 21:02 ershov

Here's an example of full debug output: printer-debug-out.txt

ershov avatar Feb 01 '25 21:02 ershov

Check release v12.0.1

It cleans up the PDF file if the start/end can't be found.

Evidlo avatar Feb 05 '25 16:02 Evidlo

Hmm I think, my main concern is that it doesn't work. Not cleaning up failed files is a side effect of it.

ershov avatar Feb 07 '25 13:02 ershov

As you said in your 2nd comment, the problem is that your computer is sending Postscript instead of PDF data. Delete your computer's reMarkable printer configuration and set it up again. The driver you choose during setup is important.

Evidlo avatar Feb 08 '25 02:02 Evidlo

Hey this is MacOS, I don't have control over what it sends. I configured the printer in a standard way and that's what it does. Is there any way to make it send PDFs?

ershov avatar Feb 17 '25 18:02 ershov

You have to follow the instructions in the readme. If you didn't set the protocol it won't work

On February 17, 2025 12:01:43 PM CST, Yury Ershov @.***> wrote:

ershov left a comment (Evidlo/remarkable_printer#45)

Hey this is MacOS, I don't have control over what it sends. I configured the printer in a standard way and that's what it does. Is there any way to make it send PDFs?

-- Reply to this email directly or view it on GitHub: https://github.com/Evidlo/remarkable_printer/issues/45#issuecomment-2663806680 You are receiving this because you commented.

Message ID: @.***>

Evidlo avatar Feb 17 '25 19:02 Evidlo

Hey I did follow the instructions. "HP Jetdirect" is the default and there's not a lot of options available: AirPrint, IPP, LPD, HP Direct Jet. It's hard to misconfigure it.

ershov avatar Feb 18 '25 06:02 ershov

Maybe you can try directly through the CUPS web interface:

Image

Image

If you don't see that option, then OSX might have removed it. Have you also tried the easy install method?

Evidlo avatar Feb 18 '25 07:02 Evidlo