Support Forum

If you want to show a shortcode in forum post - use [ instead of [ as you write it so you can see the shortcode 😉

We use and recommend UK2 for hosting - get a month free

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register sp_MemberList Members

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
I would like to create various .pdf reports
13th October 2019
5:59 pm
Avatar
Playas de Rosarito, Baja California, Mexico
Member
Members
Forum Posts: 97
Member Since:
9th July 2019
sp_UserOfflineSmall Offline

I am requesting instruction on the basic structure/architecture of the pdf generation system you are employing in order to create some custom pdf reports.
If you are willing I would be able to send you all that I create for possible inclusion in your product.
I understand that all custom scripts would be overwritten with every update requiring us to re-upload them.
I am an experienced programer.

14th October 2019
9:00 am
Avatar
Admin
Forum Posts: 864
Member Since:
4th March 2015
sp_UserOfflineSmall Offline

We use the fpdf.org PDF generation script to create PDFs.
The US uses different page sizes from the rest of the world, so page size is stored in a WordPress option obtainable from get_option('church_admin_pdf_size');
If you look at pdf-creator.php you will see the other PDF scripts. Some of the scripts are quite old and clunky - church_admin_tickets_pdf() is a better example.

The PDFs are generated on the fly as caching them is a security vulnerability for snoopers.
They are called from church_admin_download() in index.php and I use WordPress nonces to ensure they are only generated by clicking links created on the site.

One issue with PDF creation is accents (diacritics) etc. WordPress sites are usually UTF-8 character encoded which doesn't work in PDFs which use a different encoding. I've tried various ways of sorting the issue to work worldwide. The slightly clunky but viable solution is to escape all text to be output with urldecode(church_admin_encode()). An example is line 59 of pdf-creator.php

Send them over once done as they may be worth including for everyone!

If you are finding the plugin useful, please subscribe to the app - it's free for your congregation to use and only £9.99pm for a church subscription - free int'l bank transfers with Revolut

14th October 2019
7:13 pm
Avatar
Playas de Rosarito, Baja California, Mexico
Member
Members
Forum Posts: 97
Member Since:
9th July 2019
sp_UserOfflineSmall Offline

Thank you again! I love your app and can't wait to have something to contribute!11

30th October 2019
5:13 pm
Avatar
Playas de Rosarito, Baja California, Mexico
Member
Members
Forum Posts: 97
Member Since:
9th July 2019
sp_UserOfflineSmall Offline

In reading the docs for FPDF I found that there is a class/script called tFPDF that solves the UTF-8 unicode problem.
http://www.fpdf.org/en/script/.....ript92.php

2nd December 2019
9:54 pm
Avatar
Admin
Forum Posts: 864
Member Since:
4th March 2015
sp_UserOfflineSmall Offline

Plugin now uses that tFPDF, which was hopelessly out of date so I added some bits to it, so it matches FPDF methods.
Note the fpdf manual is also unhelpful as the dejaVuCondensed font is condensed and doesn't have the diacritics in it!!!

If you are finding the plugin useful, please subscribe to the app - it's free for your congregation to use and only £9.99pm for a church subscription - free int'l bank transfers with Revolut

Forum Timezone: Europe/London

Most Users Ever Online: 101

Currently Online:
1 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Pastor Andres: 97

Rich Cox: 94

David Z.: 84

rrfranks: 55

Allen: 51

seanmcint: 49

Jon: 44

Gavin: 41

Janeen: 23

365sussex: 21

Member Stats:

Guest Posters: 44

Members: 408

Moderators: 0

Admins: 1

Forum Stats:

Groups: 5

Forums: 14

Topics: 567

Posts: 2112

Administrators: andymoyle: 864