Extracting text from a PDF file or filling a montlhy PDF Courses Form

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Extracting text from a PDF file or filling a montlhy PDF Courses Form

Post by teriibi » Wed Jan 10, 2018 7:12 pm

Hi,

Can someone update me about those two solutions I plan...

1) Having to Extract lines of text from a PDF monthly document,
rebuild my own look alike format.
Complete all fields and make a printable completed similar PDF doc.
Or..
2) Fulfill all empty fields with data from a managing stack...and print it too.
(in that case no content import/export, just editing/adding text above/within the PDF file.

I believe the second solution is less flexible since the fields to complete will be at a sligthly different location and with dif sizes, each month. :shock:

Which ever is doable under LC. ?!!
TKS

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Extracting text from a PDF file or filling a montlhy PDF Courses Form

Post by MaxV » Fri Jan 12, 2018 4:53 pm

teriibi wrote:
Wed Jan 10, 2018 7:12 pm

2) Fulfill all empty fields with data from a managing stack...and print it too.
(in that case no content import/export, just editing/adding text above/within the PDF file.
This is easy with livecode and more flexible.
The PDF format is one way to untouchable, when something is in PDF can't come back anymore. PDF was created to print, not to modify it or else.

If you design correctly your LIVECODE template, the result will be always the same.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Extracting text from a PDF file or filling a montlhy PDF Courses Form

Post by teriibi » Fri Jan 12, 2018 8:43 pm

Code: Select all

when something is in PDF can't come back anymore.
Uuuhh...did know ppl at Adobe were that mean !
aiaiiii... :?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Extracting text from a PDF file or filling a montlhy PDF Courses Form

Post by FourthWorld » Sat Jan 13, 2018 5:53 am

Are these documents meant to be printed?

I wonder if a more modern, maleable format like ePub may be a good fit.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Extracting text from a PDF file or filling a montlhy PDF Courses Form

Post by teriibi » Sat Jan 13, 2018 1:12 pm

Actualy, just 1 copy to paper
All other - look alike - copies would be only virtualy shared under some electronic format sqlite/pdf/excel

I thought of just making an empty Form from scratch with sqlite. then export it to PDF,
+ probably an APP that syncro over the net witht the same monthly data...so no need of a PDF for those users.

still the 1 paper copy is needed.
the burden is having to manualy copy/paste new data everymonth from delivered PDF to the LC stack.
Thats the way I will go if I cant automate it afterall.. :|

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Extracting text from a PDF file or filling a montlhy PDF Courses Form

Post by MaxV » Mon Jan 15, 2018 2:30 pm

Livecode can create PDF, so centralize all on livecode.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Extracting text from a PDF file or filling a montlhy PDF Courses Form

Post by teriibi » Mon Jan 15, 2018 9:58 pm

For the same final doc. :

Which content is lighter to transfer/downlaod from a Server to several Devices ?
PDF data content ...or ...EPUB data content ?
or it is just the same.
Can one build an epub doc from a device ?
Same for PDF ?
Or one has to download ready made EPUBS end PDFs files ?

finaly
Can one print an Epub doc as easely as one print PDF from any devices Oses, IOs, Android/Linux/windows ?

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Extracting text from a PDF file or filling a montlhy PDF Courses Form

Post by MaxV » Fri Jan 19, 2018 1:31 am

epub is lighter than PDF
epub is just a text file, very easy to write.
PDF is a nightmare.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Extracting text from a PDF file or filling a montlhy PDF Courses Form

Post by teriibi » Fri Jan 19, 2018 11:04 am

,,,any other format that could offer a more "fancy look" like a PDF print ?
I think thats why PDF is so popular today..

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Extracting text from a PDF file or filling a montlhy PDF Courses Form

Post by MaxV » Wed Jan 24, 2018 2:07 pm

You can use HTML, any web page is in HTML and is fancy.

I think that HTML probably is the best for you, because:
  • just a single HTML file for multiple pages
  • it is pure text, so is very easy to edit, write, modify
  • it auto-formats to device or paper format
  • whan you print it, it autosplits on multiple pages
  • just use a browser to see it
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9286
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Extracting text from a PDF file or filling a montlhy PDF Courses Form

Post by richmond62 » Tue Jun 16, 2020 3:24 pm

There are PDF documents and PDF documents . . .

Older PDF documents are, to all intents and purposes just multi-page images, and as such are useless re importing text
and can generally only be converted to text using OCR, which I can assure you is a headache of gargantuan proportions,
especially when the text is in non-Latin script.

Newer PDF documents contain an embedded text layer which can be selected, copied and pasted elsewhere . . .

Mind you, I have no idea how you would extract that embedded text layer into, say, a LiveCode textField.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”