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

SQL-PDF-Vala/Genie: Set report metadata (after upgrading to Cairo 1.16+). #29

Open
rgolubtsov opened this issue Feb 24, 2017 · 2 comments
Assignees

Comments

@rgolubtsov
Copy link
Owner

See subj. This belongs to both Vala and Genie implementations:
reporter-cli/sql-pdf/vala/src/reporter_controller.vala and
reporter-cli/sql-pdf/genie/src/reporter_controller.gs
Look at the following block:

        // --- Report metadata ------------------------------------------------
        /*
         * Note: The possibility to inject PDF metadata entries has appeared
         *       in Cairo 1.16, but even in Arch Linux the "cairo" package
         *       currently is just of version 1.14.8. And, of course, its Vala
         *       bindings are in the same state. After upgrading to Cairo 1.16+
         *       appropriate calls should look something like the given below
         *       (commented out for now).
         *
         * See for reference:
         *   - Cairo sources:
         *       https://cgit.freedesktop.org/cairo/tree/src/cairo-pdf.h
         *       https://cgit.freedesktop.org/cairo/tree/src/
         *                                           cairo-pdf-surface.c
         *
         *   - Cairo Valadoc:
         *       https://valadoc.org/cairo/Cairo.PdfSurface.html
         */
//      _report.set_metadata(PdfMetadata.TITLE,    _REPORT_TITLE   );
//      _report.set_metadata(PdfMetadata.AUTHOR,   _REPORT_AUTHOR  );
//      _report.set_metadata(PdfMetadata.SUBJECT,  _REPORT_SUBJECT );
//      _report.set_metadata(PdfMetadata.KEYWORDS, _REPORT_KEYWORDS);
//      _report.set_metadata(PdfMetadata.CREATOR,  _REPORT_CREATOR );

In Arch Linux still there is Cairo 1.14.8 (as of 2017-02-25):
https://www.archlinux.org/packages/extra/x86_64/cairo/

@rgolubtsov
Copy link
Owner Author

This also belongs to JavaScript implementation:
reporter-cli/sql-pdf/js/src/reporter-primary/reporter-controller.js
Look at the following block:

        // --- Report metadata ------------------------------------------------
        /*
         * Note: The possibility to inject PDF metadata entries has appeared
         *       in Cairo 1.16, but even in Arch Linux the "cairo" package
         *       currently is just of version 1.14.8. And, of course,
         *       its Node.js bindings are in the same state. After upgrading
         *       to Cairo 1.16+ appropriate calls should look something
         *       like the given below (commented out for now).
         *       (Also note that the "canvas" npm package used
         *       must explicitly implement it.)
         *
         * See for reference:
         *   - Cairo sources:
         *       https://cgit.freedesktop.org/cairo/tree/src/cairo-pdf.h
         *       https://cgit.freedesktop.org/cairo/tree/src/
         *                                           cairo-pdf-surface.c
         *
         *   - canvas at npm:
         *       https://npmjs.com/package/canvas
         */
//      _report.set_metadata(Canvas.TITLE,    _REPORT_TITLE   );
//      _report.set_metadata(Canvas.AUTHOR,   _REPORT_AUTHOR  );
//      _report.set_metadata(Canvas.SUBJECT,  _REPORT_SUBJECT );
//      _report.set_metadata(Canvas.KEYWORDS, _REPORT_KEYWORDS);
//      _report.set_metadata(Canvas.CREATOR,  _REPORT_CREATOR );

In Arch Linux still there is Cairo 1.14.8 (as of 2017-03-13):
https://www.archlinux.org/packages/extra/x86_64/cairo/

@rgolubtsov
Copy link
Owner Author

In Arch Linux Cairo is already 1.16.0 (as checked on 2019-06-13):
https://www.archlinux.org/packages/extra/x86_64/cairo/

But in Ubuntu Xenial it is 1.14.6 and will be that:
https://packages.ubuntu.com/xenial/libcairo2
(Travis CI build is configured against Xenial.)

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

No branches or pull requests

1 participant