Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Join Date
    Apr 2013
    Location
    USA
    Posts
    132
    Provided Answers: 2

    Unanswered: Any solution for PDF as attachment?

    Few months ago a user open a threat regarding invoices as pdf format and send them via email.

    So far I haven't heard the solution.

    I found another solution:

    I created a process to save the invoice in html format and attached to the record. Then send email with attachment.
    When I send the email with attachment using outlook on exchange server plataform works great. The recepient receive the email with the html invoice as attacment.

    The problem that I'm facing is that when using outlook with gmail settings (at home) the attacment on target is displayed on the body of the email as plain html code.

    Any suggestions or ideas will be appreciated.
    Last edited by spyroot; 04-10-14 at 13:58.

  2. #2
    Join Date
    Apr 2013
    Posts
    226
    I wonder if something like this could be integrated into a BD application?

    https://github.com/MrRio/jsPDF

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    there's several similar libraries
    ... I don't know how BD works, but what you could do is write the data to a flat file, then run a process on that flat file which creates the PDF... you could use PHP on the command line (ie not runing in a web server)
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    The problem that I'm facing is that when using outlook with gmail settings (at home) the attacment on target is displayed on the body of the email as plain html code.
    Can you please explain more about your actual problem?

    Brilliant Database doesn’t have to send email through an Email Application you may have installed on your PC. It can send the email itself directly by SMTP.

    So no need to have any email application, and it makes no difference what PC the database is running on.

    If you want to send an Attachment as a PDF, there's a number of options. It just depends on how automated you want to make all this.

    I personally prefer the free option like PrimoPDF which basically just acts as a virtual printer. I print my PDF to a file using this progarm, and I attached it to my email and send it.

    If you want to automate it all from inside brilliant database, you can use a command line HTML to PDF. I've done this for a client, but we used a HTML 2 PDF converter their IT department purchased.

    I'm not sure what the free options are in this regard, or where you would even find one.

    Regards
    James

  5. #5
    Join Date
    Apr 2013
    Location
    USA
    Posts
    132
    Provided Answers: 2
    Hello to all and thank you for your help on this issue.

    Thank you Tubbritt for your interest. I did something similar what you did but I used bullzip pdf printer instead.

    Objetive : Create automatic invoices on pdf format and attached to email and send it to customer

    Tools need it: Bullzip (pdf virtual printer), outlook and "click yes"

    steps:
    Install click yes (program to click on outlook yes button [security])
    Configure outlook with your existing email.
    create a Temp folder under C drive (c:\Temp).
    Install bullzip pdf (virtual printer)
    change the settings of bullzip printer to auto save files as c:\Temp\invoice.pdf (see conf.zip)

    Download and run the attached db file.

    Notes: also you can setup bullzip to auto save pdf file on [$myfiles] folder.
    if you don't like click yes, you can download and install MAPILab Advance Security for Outlook

    Suggestions to polish or to reduce the process are more than welcome.
    Attached Files Attached Files
    Last edited by spyroot; 04-11-14 at 02:46.

  6. #6
    Join Date
    Apr 2013
    Posts
    226
    I guess it depends who the application is for. If it is for a specific customer where you can control that they have all these things installed on their computers then it may be ok. If you are selling the application more widely this just wouldn't be a satisfactory list of requirements IMO. I would ideally want the e-mail to be sent direct via SMTP with the attachment.

    Matty

  7. #7
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    Hi spyroot

    That method you posted on how to get a printout into a PDF is pretty much what I was doing, only I used a paid for command line pdf converter.

    The benefit of using a command line over what your doing is simply that there's no additional application the end user has to install. Its exe can be compailed as part of brilliant database by simply placing the exe in the myfiles folder.

    So, ultimately the best solution here would probably be to just find a free command line virtual printer. I'm sure there must be one somewhere. Or stick with what you already have which will require some setup on the end users PC.

    There's that or use HTML and SMTP. If you go with SMTP, there should be no issues with any email not being display correctly. The only down side to HTML though is that a HTML file depends on other files for graphics and so on so in my opinion, it's a very bad file format to send emails in.

    Regards
    James

  8. #8
    Join Date
    Apr 2013
    Posts
    226
    Is it not possible to add a PDF when sending by SMTP then? I've never experimented with this, but the email template has an option to add attachments of current record or record from query and a mask facility.

  9. #9
    Join Date
    Apr 2013
    Location
    USA
    Posts
    132
    Provided Answers: 2
    You're right matty1965, for selling the application will be nice to have everything in one single installation.

    I will try to use command line pdf converter. Turbbritt, do you have some examples for sharing?

    Tubbritt, if I use SMTP method throughout bdb, is there any way to let end user to change their settings without going to the email template settings?

  10. #10
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    I will try to use command line pdf converter. Turbbritt, do you have some examples for sharing?
    Nothing I'd be allowed to share I'm afraid.
    If you come across a good free command line converter, I'd be happy to write an example around it.

    Tubbritt, if I use SMTP method throughout bdb, is there any way to let end user to change their settings without going to the email template settings?
    Yes, just give the user a buttons or a menu item on the tool bar called SMTP Settings for them to click.

    When clicked, give this item the ability to popular 4 variables based on “User Input”.

    The for pieces of information you need to get them to input are.

    1: The SMTP Server
    2: Senders Name
    3: Username
    4: Password.

    Once you have created the Variables, convert them to Static Variables so that they don't forget the values entered when the database is closed down.

    Regards
    James

  11. #11
    Join Date
    Apr 2013
    Location
    USA
    Posts
    132
    Provided Answers: 2
    got it.

    Let me try, I will get back to you guys.

  12. #12
    Join Date
    Apr 2013
    Location
    USA
    Posts
    132
    Provided Answers: 2
    Tubbritt, after assigning the value from smtp settings to static variables, how do I assign them to the smtp template properties?

    I assigned the static variables to smtp field but does not work.

    Is that the correct way?
    Attached Thumbnails Attached Thumbnails template properties.png  

  13. #13
    Join Date
    Apr 2013
    Location
    USA
    Posts
    132
    Provided Answers: 2
    Also I'm assign directly the smtp values (for testing purposes) and conection test failed.

    The values assigned are:

    SMTP Server: smtp.google.com
    Sender : name
    Account Name: name@gmail.com
    password : ********

    Does anyone knows the fix?

  14. #14
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    Quote Originally Posted by spyroot View Post
    Tubbritt, after assigning the value from smtp settings to static variables, how do I assign them to the smtp template properties?

    I assigned the static variables to smtp field but does not work.

    Is that the correct way?
    Yes, that's correct.

    Regards
    James.

  15. #15
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    Quote Originally Posted by spyroot View Post
    Also I'm assign directly the smtp values (for testing purposes) and conection test failed.

    The values assigned are:

    SMTP Server: smtp.google.com
    Sender : name
    Account Name: name@gmail.com
    password : ********

    Does anyone knows the fix?
    You will have to login to your gmail account and make sure it's set to allow SMTP, plus in brilliant database for gmail you must enable Authentication on the SMTP setup page.

    Personally, I never use Gmail as it's not a proper mailing service in my opinion. Using a normal web HOST or server I've never had any problems.

    Regards
    James.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •