[bug #65097] gropdf: one 'ps:' tag is now not processed

2024-01-11 Thread Bjarni Ingi Gislason
Follow-up Comment #5, bug#65097 (group groff):

  I have added this to my version of "gropdf":

elsif ($par=~m/exec decornone/)
{
#   skip processing
}
elsif ($par=~m/exec 0 setlinejoin/)
{
#   skip processing, already processed earlier
}
elsif ($par=~m/def grops begin/)
{
#   skip processing
}



___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #65097] gropdf: one 'ps:' tag is now not processed

2024-01-11 Thread Deri James
Update of bug#65097 (group groff):

  Status:   Need Info => Invalid
 Open/Closed:Open => Closed 

___

Follow-up Comment #4:

Yes. Bjarni's else clause does not catch valid errors, not all ps: tags can be
processed into valid pdf. I support the ones emitted by our pre-processors and
macros (apart from the postscript underline function from mom).


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #65097] gropdf: one 'ps:' tag is now not processed

2024-01-11 Thread G. Branden Robinson
Update of bug#65097 (group groff):

  Status:None => Need Info  

___

Follow-up Comment #3:

Deri, is this ticket invalid?


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #65097] gropdf: one 'ps:' tag is now not processed

2023-12-30 Thread G. Branden Robinson
Update of bug#65097 (group groff):

 Assigned to:None => deri   


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #65097] gropdf: one 'ps:' tag is now not processed

2023-12-30 Thread G. Branden Robinson
Follow-up Comment #2, bug#65097 (group groff):

[comment #1 comment #1:]
> If I look at the output produced by:-
> 
> pdfmom ../doc/automake.mom -P-d | less
> 
> I can see:-

> % x X ps: exec 0 setlinejoin
> %% V12000
> 0 j
> % V12000
> % H72000
> % x X ps: exec 0 setlinecap
> %% wh2500
> 0 J


Deri has stated a few times that he does his testing only on the
deri-gropdf-ng branch, so I thought I'd add that I see exactly the same
output above on the master branch.

Regards,
Branden



___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #65097] gropdf: one 'ps:' tag is now not processed

2023-12-30 Thread Deri James
Follow-up Comment #1, bug#65097 (group groff):

If I look at the output produced by:-

pdfmom ../doc/automake.mom -P-d | less

I can see:-

% x X ps: exec 0 setlinejoin
%% V12000
0 j
% V12000
% H72000
% x X ps: exec 0 setlinecap
%% wh2500
0 J

So the "0 j" has been emitted in response to the 0 setlinejoin, and "0 J" for
the 0 setlinecap. So the code is working as expected. Before the last change
to accomodate both on the same command the code was essentially one switch
statement dealing with all the \X'ps: ...' commands which gropdf is designed
to handle, documented in gropdf.1. Since the change, it is now two switch
statements, an else clause at the end of the second switch will fire even if
the command was handled as part of the first switch.

Even without the split into two switches, an else clause to trap unhandled
\X'ps: ...' commands is futile because the grops man page documenting the
device control commands would allow complete postscript programs to be passed
to the printer, which a pdf file would not understand.

An example is this (which mom passes as a \Y'ps: ...' command):-

% x X ps: def
%% +grops begin
%% +/decornone { grops begin /X { } def /Y { } def /y2 -1 def end } def
%% +/decorline { grops begin u neg /uld exch def u /ulw exch def
%% + /X { currentpoint /y0 exch def /x0 exch def } def
%% + /Y { currentpoint /y1 exch def /x1 exch def
%% +  drawline /x2 x1 def /y2 y1 def } def end } def
%% +/drawline { gsave ulw setlinewidth 0 setlinecap x1 y1 uld sub moveto
%% +y2 y0 eq { x2 y2 } { x0 y0 } ifelse uld sub lineto stroke
%% +grestore } def
%% +decornone
%% +/uld 0 def
%% +/ulw 0 def
%% +/A { X show Y } def
%% +/B { 0 SC 3 -1 roll X widthshow Y } def
%% +/C { 0 exch X ashow Y } def
%% +/D { 0 exch 0 SC 5 2 roll X awidthshow Y } def
%% +/E { 0 rmoveto X show Y } def
%% +/F { 0 rmoveto 0 SC 3 -1 roll X widthshow Y } def
%% +/G { 0 rmoveto 0 exch X ashow Y } def
%% +/H { 0 rmoveto 0 exch 0 SC 5 2 roll X awidthshow Y } def
%% +/I { 0 exch rmoveto X show Y } def
%% +/J { 0 exch rmoveto 0 SC 3 -1 roll X widthshow Y } def
%% +/K { 0 exch rmoveto 0 exch X ashow Y } def
%% +/L { 0 exch rmoveto 0 exch 0 SC 5 2 roll X awidthshow Y } def
%% +/M { rmoveto X show Y } def
%% +/N { rmoveto 0 SC 3 -1 roll X widthshow Y } def
%% +/O { rmoveto 0 exch X ashow Y } def
%% +/P { rmoveto 0 exch 0 SC 5 2 roll X awidthshow Y } def
%% +/Q { moveto X show Y } def
%% +/R { moveto 0 SC 3 -1 roll X widthshow Y } def
%% +/S { moveto 0 exch X ashow Y } def
%% +/T { moveto 0 exch 0 SC 5 2 roll X awidthshow Y } def
%% +end
%% +

This is pure postscript code which is not part of the pdf standard, so all
gropdf can do is consume it, on the assumption it will mean something if the
same document is run through grops.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #65097] gropdf: one 'ps:' tag is now not processed

2023-12-30 Thread Bjarni Ingi Gislason
URL:
  

 Summary: gropdf: one 'ps:' tag is now not processed
   Group: GNU roff
   Submitter: bjarniig
   Submitted: Sat 30 Dec 2023 07:20:51 PM UTC
Category: Driver gropdf
Severity: 3 - Normal
  Item Group: Incorrect behaviour
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: None


___

Follow-up Comments:


---
Date: Sat 30 Dec 2023 07:20:51 PM UTC By: Bjarni Ingi Gislason 
Subject: gropdf: one 'ps:' tag is now not processed

Examples of an unprocessed ps-tag (shown by an additional "else"
clause in "gropdf.pl at the end of "ifelse" clauses.

  GROFFdoc/automake.pdf
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 15.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 91.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 185.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 1032.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 2209.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 3356.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 4420.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 5237.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 6690.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 7847.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 8831.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 9517.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 9940.
\X'ps: exec 0 setlinejoin' was not processed at
/home/bg/git/groff/build/gropdf line 1121, <> line 9953.

  This does not fit in with the recently changed test

-   elsif ($par=~m/exec (\d) setlinejoin/)
+   elsif ($par=~m/exec.*? (\d) setlinejoin/)
 








___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/