Text not printing (Images print ok)

Questions on Installation
Post Reply
skezo
Posts: 4
Joined: Fri Jul 03, 2020 11:31 am

Text not printing (Images print ok)

Post by skezo »

I have a USB printer connected to a Raspberry Pi. The Raspberry Pi runs CUPs and Turbo Print. Everything works well except when trying to print pages with text. From the print log it seems to be an issue with Ghostscript but I am not sure how to fix it. I was hoping this topic would resolve it but `gszedo` is not available with the ARM version.

Printing the test files (e.g. testmargins-a4.ps) directly with `lp` works correctly so does sending the test print from CUPs.

Has anyone else come across this issue?

Print Log

Code: Select all

#######################################################
NEW PRINT JOB Tue Jun 30 13:45:26 BST 2020 (pstoturboprint 2.48-1)
job-id 21
user 6.1 Plus
title Enhancing your photos through artificial intelligence - Microsof
copies 1
options orientation-requested=3 printer-resolution=360x360dpi sides=one-sided print-color-mode=color job-uuid=urn:uuid:dfe1dfb5-9a18-3325-48db-d205344e8cab job-originating-host-name=192.168.2.111 date-time-at-creation= date-time-at-proce$
file
ppdfile /etc/cups/ppd/XP100series-TurboPrint.ppd
queue XP100series-TurboPrint
process info: uid=7(lp) gid=7(lp) groups=7(lp)
test directory access:
drwxr-xr-x 2 root root 24576 Jun 30 08:18 /usr/share/turboprint/printers
        /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v6l.so (0xb6f90000)
        libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6e49000)
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6dc7000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6c79000)
        /lib/ld-linux-armhf.so.3 (0xb6fa3000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6c4c000)
device for XP100series-TurboPrint: tpu://Epson/XP-102_103_Series/SN=5153454B3030363852
/usr/bin/tpprint -v2 -l/var/log/turboprint/print.log '--username=6.1 Plus' '--ppdfile=/etc/cups/ppd/XP100series-TurboPrint.ppd' --psfeatures  '---orientation-requested=3' '---printer-resolution=360x360dpi' '---sides=one-sided' '---$
Searching PPD file and postscript header for options...
page size A4 overwritten by ---media=A4
duplex overwritten by ---Duplex=None
check_flag_file: opening /var/spool/turboprint/6.1 Plus/prv/XP100series-TurboPrint
check_flag_file: opening /var/spool/turboprint/6.1 Plus/sml/XP100series-TurboPrint
tpprint: at end of main result=0
----------- Start of var file -----------
PDFFILE=1
GSPPDFOUND=1
GSCOLORMODE=2
GSCOLORBITS=8
GSXDPI=360
GSYDPI=360
GSWIDTH=2976
GSHEIGHT=4209
TPWIDTH=8268
TPHEIGHT=11693
TPXOFFSET=0
TPYOFFSET=0
DUPLEXMEDIA=A4
DUPLEX=0
PREVIEW=0
NOPRINT=0
BORDERLESS=0
PVXDPI=87
PVYDPI=87
PVWIDTH=719
PVHEIGHT=1017
----------- End of var file -----------
tpstdin --parsedsc result=0
GSRESULT= GSVERSION= GSZEDODEVICE=0
GSCOMMANDLINE=gs -sDEVICE=ppmraw -r360x360 -g2976x4209 -dSAFER -dDisableFAPI=true -dNOPAUSE -dBATCH
TPCOMMANDLINE=/usr/bin/tpprint -a0 -e1 -s8268x11693 -p0x0 -v2 -l/var/log/turboprint/print.log  '---orientation-requested=3' '---printer-resolution=360x360dpi' '---sides=one-sided' '---print-color-mode=color' '---job-uuid=urn:uuid:dfe1dfb$
COMPLETEPIPE=/usr/lib/turboprint/tpstdin --paste /tmp/pstoturboprint2506.chunk | gs -sDEVICE=ppmraw -r360x360 -g2976x4209 -dSAFER -dDisableFAPI=true -dNOPAUSE -dBATCH  -sOutputFile=/tmp/pstoturboprint2506.fifo - >> /var/log/turboprint/pr$
PREVIEWPIPE=
----------- Start of print job -----------
backchannel_fd=5
tpprint 2.48-2 x32 (23-MAY-2019) - TurboPrint printer driver
Copyright (C)ZEDOnet GmbH, Irsee, Germany. All rights reserved.
30-Jun-2020 13:45
PPD file: /etc/cups/ppd/XP100series-TurboPrint.ppd
header file: /tmp/pstoturboprint2506.chunk
Could not open freepipes pipe /var/spool/turboprint/6.1 Plus/fd
Searching PPD file and postscript header for options...
page size A4 overwritten by ---media=A4
duplex overwritten by ---Duplex=None
interpret_ps: no output file specified
::set_info_paths: setting preview file to /var/spool/turboprint/6.1 Plus/zmf/21.zmf
GPL Ghostscript 9.27 (2019-04-04)
Copyright (C) 2018 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Processing pages 1 through 1.
Page 1
   **** Error reading a content stream. The page may be incomplete.
               Output may be incorrect.
   **** Error: File did not complete the page properly and may be damaged.
               Output may be incorrect.
# Image generated by GPL Ghostscript (device=ppmraw)Filetype=PBM Plusbits_per_pixel=32 bytes_per_line=11904  width=2976 height=4209
RGB mode 8bit
printable_width=8028 max_printable_width=15000

command level=21 feature set=5 duplex=0
Printer=Epson_XP100series; Module=Epson; Id=SX420
printable_width=8028 max_printable_width=15000

Colormode=2; Cartridge=0=Color; Quality=1=Low; Paper=0=Plain paper
Pagesize=3=A4; Paper Input=0=Automatic Feed; Paper Output=0=Front
Duplex=0=Off; Copies=1; Mirror=0; Dithering=0; Flip=0
Page x=2890 y=4123; AppDpi x=360 y=360; DitDpi x=360 y=360;
PrnDpi x=360 y=360; Overlay=0
Print Direction=Default (0:1,0,0,0);
tpfile::get_patchsample_table: paper=Plain paper
patches; linmode=density
table::build_gamma_table: i=0 color=4 gamma=100 max=100 saturation=100
gamma 100 max 100 saturation 1000 for channel 0
correction=32767
table::build_gamma_table: i=1 color=5 gamma=100 max=100 saturation=100
gamma 100 max 100 saturation 1000 for channel 1
correction=32681
table::build_gamma_table: i=2 color=6 gamma=100 max=100 saturation=100
gamma 100 max 100 saturation 1000 for channel 2
correction=33562
table::build_gamma_table: i=3 color=7 gamma=100 max=100 saturation=100
gamma 100 max 100 saturation 1000 for channel 3
correction=32427
matchtable->profile_datafile_version = 1
shadow: 0 => adjust 100 min 50/10 max 50; grey: a=0 b=0; colorspace=APPLE; cmykspace=0; intent=perceptual; M2; daylight = 6500K
matchtable->numchannels=4
multi_profile_switch=150 multi_c2_switch=100 multi_m2_switch=100
ucr_up=166; max_ink=638; ucr_add=0
polyfit mode=0 channels=4 terms=57 patches=528
have_brighter_grey=0
max_dens_val[GREY_BRIGHT]=-32768 min_dens_val[GREY_BRIGHT]=32767 max_dens_val[GREY_BRIGHTER]=-32768 min_dens_val[GREY_BRIGHTER]=32767
bright_cyan_fac=0  bright_magenta_fac=0
black_fac=100 cyan_fac=44  magenta_fac=54 yellow_fac=35
printer white:l=936 a-007 b+002
printer white poly:l=936 a-007 b+002
printer black:l=249 a+007 b+029
printer black poly:l=240 a+007 b+021
printer darkest poly:l=240 a+007 b+021
black   l=00 a+00 b+00 => l=240 a+007 b+021: K99 C00 M00 Y00 c00 m00 k00 g00 h00
black94 l=06 a+00 b+00 => l=291 a+013 b+028: K69 C60 M48 Y42 c00 m00 k00 g00 h00
black87 l=17 a+00 b+00 => l=343 a+018 b+028: K41 C74 M57 Y44 c00 m00 k00 g00 h00
black75 l=34 a+00 b+00 => l=449 a+008 b+010: K05 C79 M55 Y41 c00 m00 k00 g00 h00
black62 l=48 a+00 b+00 => l=547 a-001 b+001: K00 C44 M32 Y32 c00 m00 k00 g00 h00
black50 l=60 a+00 b+00 => l=637 a-002 b+001: K00 C28 M20 Y21 c00 m00 k00 g00 h00
black37 l=71 a+00 b+00 => l=718 a-003 b+002: K00 C18 M13 Y13 c00 m00 k00 g00 h00
black25 l=82 a+00 b+00 => l=795 a-004 b+001: K00 C11 M07 Y07 c00 m00 k00 g00 h00
black12 l=91 a+00 b+00 => l=867 a-003 b+003: K00 C04 M03 Y02 c00 m00 k00 g00 h00
white   l=99 a+00 b+00 => l=936 a-007 b+002: K00 C00 M00 Y00 c00 m00 k00 g00 h00
cyan    l=89 a-54 b-17 => l=784 a-142 b-186: K00 C28 M00 Y00 c00 m00 k00 g00 h00
magenta l=64 a+87 b-52 => l=647 a+470 b-147: K00 C00 M49 Y00 c00 m00 k00 g00 h00
yellow  l=97 a-14 b+86 => l=870 a-057 b+632: K00 C00 M00 Y58 c00 m00 k00 g00 h00
red     l=58 a+77 b+70 => l=584 a+410 b+361: K00 C00 M97 Y98 c00 m00 k00 g00 h00
green   l=86 a-84 b+72 => l=731 a-276 b+430: K00 C23 M00 Y62 c00 m00 k00 g00 h00
blue    l=32 a+60 b-105 => l=465 a+159 b-369: K00 C95 M43 Y00 c00 m00 k00 g00 h00
epson::setup_printer_info: number of channels: 4
epson::setup_printer_info: bits per pixel: 2
Epson init string: ESC ( K 2 ESC U 0 ESC ( m 33 ESC ( e 17
epson::setup_printer_info: color nozzles:42 color spacing:120 black nozzles:128 black spacing:120
epson::setup_printer_info: sx420 nonstandard head layout
epson_info.top_feed=424 epson_info.top_margin=-762 epson_info.bottom_margin=8333 epson_info.unit_y=720 epson_info.y_pixel_units=2
esc(C 20e3 esc(c fffffd06 208d
Microweave information
nozzlespacing=3 package=3 totalpasses=3 unitpixels=3
numbuffers=7
calculate_weave_parameters_sub(min)

nozzlenum=42 used_nozzles=41 cycle_length=3 feed_sum=3
Sequence 1>1(0),1>2(0),1>0(0),
calculate_weave_parameters_sub(reg)

nozzlenum=42 used_nozzles=41 cycle_length=3 feed_sum=123
Sequence 40>1(0),40>2(0),43>0(0),
feed_total=123 feed_minimum_total=3 feed_buildup_total=0 feed_builddown_total=0
total_passes=3 buildup_steps=6 builddown_steps=6
borderless_interleave num_headbuffers=21
borderless_buildup=0 buildup_steps=6 y_builddown=4418 max_height=4547 builddown_steps=6
y_cover=128 color_max_off=86 unit_pixels=3
esc(m 33
Colormatch file=XP300; Curves=360dpi_xp200; Table=plain_paper
Report at end of pdrive_class::begin_page
Total memory usage=1587921
calculate_dim: print left=0 top=0 width=2890 height=4123
calculate_dim: section left=43 top=43 width=2890 height=4123
check_add_logo returned 0
Printed section of picture:
  left=43 top=43 width=2890 height=4123
Printer: resolution x_dpi=360 y_dpi=360 color_mode=2
Page - printable area in printer pixels:
  left=43 top=43 width=2890 height=4123
Print size in printer pixels, relative to printable area:
  left=0 top=0 width=2890 height=4123
tpprint::update_ink: black_type=0 rgb_mode=0
tpprint::update_ink: black_type=0 rgb_mode=0
ERROR:
inifile::write: could not open output file
/var/spool/turboprint/6.1 Plus/XP100series-TurboPrint.ink
Time for <Profile> = 10777
Time for <Color> = 2022
Time for <Dither> = 20
Time for <Print> = 85
Time for <Total> = 14332
Line counters: skip=0; bitmap=0; others=4123; 8bit=0; white=4123; b/w=0
Color 0 sum: 0
Color 1 sum: 0
Color 2 sum: 0
Color 3 sum: 0
total sum: 0
pixmap_class::open: end of file reached
print_page: end of input file
Report at end of pdrivecontrol_class::release_printer
Total memory usage=0
ERROR:
inifile::write: could not open output file
/var/spool/turboprint/6.1 Plus/XP100series-TurboPrint.job
tpprint: at end of main result=-21
------------ End of print job - result = 0 ------------
job cancelling procedure - TPPID=2531 GSPID=2533 PVPID=
------------ END of tpprint filter ------------
skezo
Posts: 4
Joined: Fri Jul 03, 2020 11:31 am

Re: Text not printing (Images print ok)

Post by skezo »

I updated Ghostscript to v9.52 (2020-03-19) and CUPS 2.3.3.1 but same issue occurs
skezo
Posts: 4
Joined: Fri Jul 03, 2020 11:31 am

Re: Text not printing (Images print ok)

Post by skezo »

I have managed to resolve this by setting dDisableFAPI to false.

/usr/lib/cups/filter/pstoturboprint

Code: Select all

GSCOMMANDLINE="gs -sDEVICE=$GSDRIVER -r${GSXDPI}x$GSYDPI -g${GSWIDTH}x$GSHEIGHT\
 -dSAFER -dDisableFAPI=false -dNOPAUSE -dBATCH"
 
zedonet
Site Admin
Posts: 2156
Joined: Fri Oct 06, 2006 8:02 am

Re: Text not printing (Images print ok)

Post by zedonet »

Hello,

thank you for posting the workaround.
Ghostscript should work reliably in default configuration, so I suspect the Postscript or PDF file that is sent to Ghostscript is not correct.

How did you print the text file - is it just ASCII text that you send from command line? Or do you print a LibreOfficed document or PDF file or an HTML page - in this case, you could send a sample document and describe from which application you printed.
skezo
Posts: 4
Joined: Fri Jul 03, 2020 11:31 am

Re: Text not printing (Images print ok)

Post by skezo »

Thanks for the reply. I tried a few different things but even when trying a simple txt file directly on the device it would not print the text. i.e. `lp -d printer guff.txt`

When trying to print PDFs, Websites, PS, txt, etc files the error was the same as the original log message above. The only successful print was the CUPS test page and Turbo Print test page.
carsten
Posts: 2
Joined: Wed Apr 21, 2021 6:07 pm

Re: Text not printing (Images print ok)

Post by carsten »

Same problem here. Ghostscript produces garbage, when called with -dDisableFAPI=true.
Grooby
Posts: 3
Joined: Sat Nov 13, 2021 12:28 am

Re: Text not printing (Images print ok)

Post by Grooby »

this seems to help with my problem.

I had setup TurboPrint driver for my Canon MP530 and has been working great for few weeks. All of suddenly, I was not able to print anything complex..PDF, Words document, text file would fail to print. After made this change, I was able to print again.
Post Reply