Comments (5)
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.
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.
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.
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.
🤩
from anthologize.
Related Issues (20)
- Include post dates in export? HOT 12
- Accessibility improvements
- PDF formatting improvements HOT 1
- "Additional metadata" for non-PDF formats HOT 2
- exports just post titles
- Note required PHP libraries in README HOT 1
- Problem with duplicate files in media HOT 1
- `fromNewId` not populated properly when left-hand items are built via JS
- Remove Dedication and Acknowledgement HOT 2
- Copyright Text Surrounded by "Spans" in PDF conversion
- There's no option for anti-copyright or public domain
- Export failures - possibly due to size? HOT 2
- EPUB PEAR extension doesn't pass PHP 7.2 linting HOT 1
- Don't use PHP sessions
- WP 4.9.x compat
- Comment count query fails when original item has been deleted
- Hyperlink issue in PDF HOT 5
- Filter out draft posts HOT 3
- Add posts' featured images HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anthologize.