1 Feb 2008 01:44
E-mailing PDFs
Here's my situation: Mac Server running 4D 2004.6 Clients are ALL Citrix-based (i.e. Windows) My users want to be able to generate PDF documents and e-mail them to customers without the intervention of an e-mail client. Here's what I'm doing now (it's in testing right now) since it's easy creating PDFs on a Mac with native 4D code: 1. User kicks off the "print" job. 2. I launch a process on the server to generate the print job using PRINT OPTION and create the PDF in a given directory on the 4D server. 3. I create a record in a table which specifies to, from, subject, body, PDF attachment path, status etc. 4. I have a stored procedure running on the server which checks every 5 minutes for records in the aforementioned table with a status of "Unsent" 5. It loops through all the "Unsent" records, builds an e-mail for each (cc'ing the sender) and sends it off from the server. Volume is pretty low....maybe 20/day. Why I like this: 1. cheap 2. no plug-ins 3. The directory I use also serves the PDFs up via http as I have Apache running on the 4D server. This allows our ERP system to retrieve the PDF documents via http since their names are predictably(Continue reading)
As I have not been to
> your classes, I may have misunderstood your original point. Exactly
> what technique are you referring to related to the physical size or
> organization of records?
I named it the 'Stable data' technique. Let me explain with an actual
example, in a company where the server never stops and the data is too big
to fit in the cache. Almost no possibilities to compact data. Because 4D
uses 128-byte blocks to save records, I calculate, for the main tables, what
will be the maximum size for a record. This is easy for fixed length fields.
For variable length, pictures and blobs are moved to another table, and text
fields are balanced by an airbag field (blob). Then, from a new datafile,
records are created by packs of 10,000. Users never actually 'create
record', but use an already created record. Records are never deleted, but
marked as deleted and reused when needed. When the limit of 10,000 records
is reach, a new pack of 10,000 is created, and so on. Every record uses the
same number of blocks, and (most important) its size never changes. So the
record never moves. Then no holes nor fragmentation. 10,000 is just my
choice, but it can be 1,000 or 1 million, why not. The good value is the
reasonable value
Hope this helps,
cheers,
Alex
> Here's my situation:
>
> Mac Server running 4D 2004.6
> Clients are ALL Citrix-based (i.e. Windows)
>
RSS Feed