I would like to create various .pdf reports | Visitor Tracking | Support

Support Forum

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: 53
Member Since:
9th July 2019
sp_UserOnlineSmall Online

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: 735
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

14th October 2019
7:13 pm
Avatar
Playas de Rosarito, Baja California, Mexico
Member
Members
Forum Posts: 53
Member Since:
9th July 2019
sp_UserOnlineSmall Online

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: 53
Member Since:
9th July 2019
sp_UserOnlineSmall Online

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

Forum Timezone: Europe/London

Most Users Ever Online: 57

Currently Online: PastorAndres
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

David Z.: 81

Rich Cox: 60

PastorAndres: 53

Allen: 51

rrfranks: 40

Gavin: 35

Jon: 23

Janeen: 23

365sussex: 21

ehout: 20

Member Stats:

Guest Posters: 40

Members: 378

Moderators: 0

Admins: 1

Forum Stats:

Groups: 4

Forums: 13

Topics: 479

Posts: 1772

Administrators: andymoyle: 735