Giter Site home page Giter Site logo

--header issues about paps HOT 7 CLOSED

dov avatar dov commented on July 24, 2024
--header issues

from paps.

Comments (7)

gnusupport avatar gnusupport commented on July 24, 2024 1

That is more than great, in the next step I will test it and make Emacs Lisp package for Emacs buffer printing and previews.

from paps.

gnusupport avatar gnusupport commented on July 24, 2024

I have the same problem, I would like to configure header.

from paps.

dov avatar dov commented on July 24, 2024

Thanks for asking about this! So I made a first implementation of it, and pushed it as part of the forthcoming version 0.8. As part of the implementation I switched to C++17. I hope it doesn't annoy to many people.

I have added three new command line options to paps:

  • --header-left - The left side of the header
  • --header-center - The center of the header
  • --header-left - The right side of the header

They all take a string that is based on python f-strings. I have defined the following variable that may be used in the definitions of the headers:

  • path - The complete path of the file being printed
  • filename - The basename (without directory) of the file being printed
  • mtime - The file's modification time
  • now - The current time
  • num_pages - The total number of pages in the document
  • page_idx - The current page being printed

Here is an example of how it may be used:

paps --header-left="{now:%Y-%m-%d %H:%M}" --header-center="{filename}" --header-right="Page {page_idx:02d}/{num_pages:02d}" --header -o hello.pdf paps.cc

Please let me know your feedback.

from paps.

dov avatar dov commented on July 24, 2024

Since this is a duplicate of #4 , I'll close this issue.

from paps.

gnusupport avatar gnusupport commented on July 24, 2024

That is great. I use paps to make nice PDF printouts from Emacs buffers. It is very useful for reporting purposes.

I guess you have forgot to customize analogously the --footer option.

Just that I cannot build it, neither configure nor meson works, you may see it in my other comment.

from paps.

dov avatar dov commented on July 24, 2024

That is great. I use paps to make nice PDF printouts from Emacs buffers. It is very useful for reporting purposes.

I guess you have forgot to customize analogously the --footer option.

Just that I cannot build it, neither configure nor meson works, you may see it in my other comment.

Note that I added footer as well, and fixed the compilation (I think). Did you have a chance to test it?

from paps.

gnusupport avatar gnusupport commented on July 24, 2024

For me it works very nice and very well.

GNU Emacs package: rcd-paps.el:
https://gnu.support/gnu-emacs/packages/GNU-Emacs-package-rcd-paps-el-76862.html

from paps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.