Coder Social home page Coder Social logo

Comments (5)

boonebgorges avatar boonebgorges commented on July 17, 2024

Thanks for your patience as I got around to giving this ticket some thought :)

Anthologize may be overkill for what you want to do here. Anthologize puts a bunch of infrastructure between WordPress and TCPDF (in addition to other export formats, but you're just interested in PDF). From a technical point of view, the easiest thing is probably to use TCPDF directly. You can crib a lot of the process from https://github.com/chnm/anthologize/blob/master/templates/pdf/class-pdf-anthologizer.php.

If you want to build on top of Anthologize so that you can gradually add features in the future, the best way is probably to generate an 'anth_project' programatically, then add 'anth_part' and 'anth_library_item' items as needed, and send the whole thing to the PDF exporter. See https://github.com/chnm/anthologize/blob/master/templates/pdf/base.php;

from anthologize.

mnelson4 avatar mnelson4 commented on July 17, 2024

Thanks for your patience as I got around to giving this ticket some thought :)

No worries, I realize I can't expect overnight turnaround for free!

I bet some folks will want other export formats than PDF, so it would be nice to piggy back on Anthologize for that.

I think I'll try creating an anth_project etc. I'll update this ticket with a link to the repo once I have one 🙂

from anthologize.

mnelson4 avatar mnelson4 commented on July 17, 2024

FYI so far, I ended up taking your advice that Anthologize might be overkill, and I’ve ended up making a separate plugin: https://github.com/mnelson4/printmyblog
It just sends the admin to a front end page, shows a “preparing blog for printing...” message, uses the rest api to load all the blog’s posts in the background, and then provides a button to print the page (uses some print css so the print button isn’t in the printed page).
I realized that, for my use-case, even PDF wasn’t necessary! I just want to facilitate exporting a digital blog to a physical copy (print). So, I think my scope is much narrower than Anthologize’s.
If anyone ever uses the plugin. and they start asking for all the same features as Anthologize, my plan is to just refer them here.
I blogged some initial plans about it here: https://cmljnelson.wordpress.com/2018/10/09/how-to-print-your-blog
So I think that will satisfy my need, so, for now, closing this issue.
Thanks for the tips @boonebgorges!

from anthologize.

boonebgorges avatar boonebgorges commented on July 17, 2024

Awesome, this is a nice clean implementation! Thanks for sharing your work back - I may leverage what you've built in future projects, as one-click printability is something that lots of clients ask for.

from anthologize.

mnelson4 avatar mnelson4 commented on July 17, 2024

🤩

from anthologize.

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.