Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

texttops should output in natural orientation #3563

Closed
michaelrsweet opened this issue Apr 23, 2010 · 3 comments
Closed

texttops should output in natural orientation #3563

michaelrsweet opened this issue Apr 23, 2010 · 3 comments

Comments

@michaelrsweet
Copy link
Collaborator

@michaelrsweet michaelrsweet commented Apr 23, 2010

Version: 1.5-current
CUPS.org User: twaugh.redhat

The texttops filter should generate output in the natural orientation for the text. If the "landscape" option is set, the page output should be landscape.

This is so that when pstops places page labels on the job they are in the same orientation as the text of the job.

Original bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=572338

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented May 11, 2010

CUPS.org User: mike

Considering this; in general, we've made no guarantees about the orientation of the page labels, in particular since documents can contain multiple orientations and there is no way for us to follow them with the current architecture...

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented May 6, 2011

CUPS.org User: mike

The pstops filter looks for the cupsRotation comment to rotate the page labels as needed.

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented May 6, 2011

"cups-texttops-rotate-page.patch":

diff -Naur cups-1.3.7.old/filter/texttops.c cups-1.3.7.new/filter/texttops.c
--- cups-1.3.7.old/filter/texttops.c 2010-03-08 11:10:23.040775000 -0800
+++ cups-1.3.7.new/filter/texttops.c 2010-03-09 16:16:28.482652000 -0800
@@ -97,6 +97,13 @@

puts("gsave");

  • /* If we're operating in Landscape (Orientation == 1 or Orientation == 3)
  • then rotate and translate the page */
    
  • if ( Orientation & 1 ) {
  • printf ("%d rotate\n", (Orientation & 3) * 90 );
  • printf("0 %.0f neg translate\n", PageLength);
  • }

if (PrettyPrint)
printf("%d H\n", NumPages);

@@ -212,7 +219,7 @@

puts("%!PS-Adobe-3.0");
printf("%%%%BoundingBox: 0 0 %.0f %.0f\n", PageWidth, PageLength);

  • printf("%%cupsRotation: %d\n", (Orientation & 3) * 90);
  • puts("%cupsRotation: 0");
    puts("%%Creator: texttops/" CUPS_SVERSION);
    printf("%%%%CreationDate: %s\n", curdate);
    WriteTextComment("Title", title);
    @@ -721,6 +728,8 @@
    puts("%%EndComments");

puts("%%BeginProlog");

  • printf("%%%%Orientation: %s\n",

  •     Orientation & 1 ? "Landscape" : "Portrait");
    

    /*

    • Download any missing fonts...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant