Designer PDF Forms for Zoho on you own server

Designer PDF Forms for Zoho on you own server

DESIGNER PDF FORMS FOR ZOHO
I thought I would share this because it took so much of my time to figure everything outI wanted forms that looked sexy and professional.  The export pdf function of Zoho was very limited as are most pdf export options of many programs.  Only high end expensive programs have options to really make fancy forms.  I liked the simplicity of Zoho in building forms but I wasn't happy with the output.  My programming object of the PDF form was simple.

1. Take Form data using Zoho
2. Send it to my own server and merge it with a designer pdf form
3. Use zoho to send the link or allow the client to print from their pdf viewer

Here is a step by step explanation on how you can do yours..there is a RESOURCE LIST at the bottom for easy access to the programs mentioned in the posting.

* Note the 6.65kb Zoho_Form_Processor.txt was replace because of a small error. For some reason I was not able to delete it.

THE PROCESS

The following is the step by step process for creating your own system.  You are provided with all of the necessary free and opensource software to create you own system.

Step #1

Use Inkscape (free www.inkscape.org) to create the form decoration. 



With this program you can create very sophisticated pdf backgrounds.  Most online documents and directly generated pdf documents from database or spreadsheets that are created by pdf generators are dull and not very attractive.

By using a inkscape you can create really attractive form backdrops that pdf files can use a the background.  When pdf's get to the point where it supports .svg then the these documents no longer need to be exported as bit map files which have a tendency to be large, but .svg as vector graphics will be small and a much higher viewing and printing resolution.

I created image below in about 10 minutes, exported it to the png format.  We will use this image next in to make our form. Inkscape has many special effects filters that you can download and use.  Look at the 2011.  This was done with a filter called "Bevel Steel", I just typed "2011" and selected the filter.  The LIONS CLUB REPORT (I had two II's i guess) was done with several processes using paths.  It is not so easy but once you master it (after an hour or so) you can do so many interesting things.








PROBLEMS FACED WITH OPENOFFICE INKSCAPE
  • Be careful not to use too high of a resolution as your pdf files will be too large.  Try using 200dpi or 120dpi.  Your forms will still look good.  If you need high printer quality then 300dpi is what you will require.  If this is the case then use .jpg compression.  The only bitmap export option is PNG so you should use GIMP 2.0 which is a free bitmap graphics program (free www.gimp.org).
  • When you make your picture backgrounds be sure to export in PNG.  Inkscape will automatically use white as the transparency.  If the white spaces are not transparent the form will be covered.
Step #2
Use Openoffice write (free www.openoffice.org) to create the pdf form.

In open office suite of programs we use write to build our form.  We load the background page made in inkscape as a backgroiund format>page>background>as>graphic. You then browse for the png file and load it as the page background.  You should remember to set margins to 0mm or there will be a white space around your form.  It is better not to have white space since most pdf viewers will print on the printable area making their own white space.  It also leaves less space for you to establish your form controls.

By the way, Openoffice can import PDF files edit them and save them again. Don't underestimate the power of FREE!



Turn on the dialog for creating forms and start by placing the form controls.  You have various options to have frames 3d or flat around the control fields.  Leave these on while you are designing your form fields.  Using the form field navigator located on the tool bar at the bottom of write you can select all of the fields and turn off the border.  I do this at the end so I can see where my fields are, otherwise you have to guess a little bit.  I like to turn off the border and prefer to use the borders on my inkscape background after I finish my editing.



Using the form builder you build your form keeping in mind how you are going to populate the fields with Zoho.  There are two kinds of form populating you have to consider. Single fields and repeating fields.  For repeating fields you have to name them in open office as IDNo1, IDNo2, IDNo3 etc.  Using your own variable names. 



Then in Zoho you simply use a for each to build the variables for your post you iterate through the values and load up the post variables.

post_vars=Map();
mRowNo=1;
for each mRow in myform[year == input.year]
{
    post_vars.put("IDNo"+mRowNo.tostring(),mRow.IDNo);
    post_vars.put("Days"+mRowNo.tostring(),mRow.Days_Attended);
    post_vars.put("Name"+mRowNo.tostring(),mRow.Name);
}

Look carefully at the code above. Not that we make IDNO tags like IDNO1, IDNO2 etc.  These are the same tags that we used in our form.  If you use IDNO01 then you need to use a Zoho sub routine to pad the number.  Keep it simple.

PROBLEMS FACED WITH OPENOFFICE WRITE
  • Make sure you get the stable version avoiding the beta versions as I have experienced problems with the form design.  It takes a little experimenting to get the forms right. 
  • Be careful of font size selection.
  • I have not experimented with any other control other than the simple field.  I use Zoho and my own functions to format the fields before I send them.
  • Dont worry about crashing.  OO (Openoffice) has a very good recovery routine.  Just remember to set your auto save to every 5 minutes. I experience crashes when I have too many applications running.  I am impatient and cause so many problems for my operating system.

Step #3
You must upload onto your server the pdftk.exe tool (free http://www.pdflabs.com/docs/install-pdftk/)

This program is a powerful utility that can do many things with PDF files.  Our interest is its ability to merge a FDF and PDF file with or without a background (picture image) then flatten it.

Read carefully the documentation, you will probably find many other things to help you like security and password protection.  These are easy to implement with ZOHO.

PROBLEMS FACED WITH PDFTK
  • I have lost countless hours because of small issues that I wasn't aware of.  Be sure that when you send data fields to the processor that you do not have unpaired brackets i.e. "(" must have ")".  The FDF will not be recognized by the PDF form.
  • Make sure that you have the right to run .exe files on your server and that where ever you instruct pdftk.exe to save files has the necessary permission. 
  • Some hosting providers don't allow you to execute programs.  Most will allow you if you ask them however.  The default is to block you!
Step #4
With the pdftk.exe file uploaded on your server you will need two PHP program scripts to take data from ZOHO create a FDF file then use pdftk.exe to merge and then create a new pdf file or print a pdf to the screen.

These programs were developed by others.  I just copied them and modified them to suite my needs.  You can find the original authors in the files.

Attachments
a)    Zoho_Form_Processor.txt
      must be uploaded to your server and renamed as a PHP file. 
      You can edit the program and change the CONFIGURATION content to suite your needs.
      Be careful if you modify it.  Always keep the original copy just in case...!
b)   createFDF.txt
      must be uploaded to your server as a PHP file. 
      This is the function that will be called from Zoho_Form_Processor.php
      to build the fdf file using post data received from  your Zoho Creator application.

PROBLEMS FACED WITH THE PHP programs

  • Any time you modify PHP programs expect headaches.  Small mistakes will render them useless. 
  • Use codelobster (free www.codelobster.com) to edit your PHP files and debug them.  You will need wampserver (free www.wampserver.org) to edit php programs. 
  • Unless you are somewhat experienced then don't modify the programs.  They are generic enough to do most of what you want to do.
Step #5
You now need to build a Zoho form application that will do the following.
a) Take form data and load a map variable
example:
post_vars=Map();
mRowNo=1;
for each mRow in myform[year == input.year]
{
    post_vars.put("IDNo"+mRowNo.tostring(),mRow.IDNo);
    post_vars.put("Days"+mRowNo.tostring(),mRow.Days_Attended);
    post_vars.put("Name"+mRowNo.tostring(),mRow.Name);
}

You can use what ever variable name you want.  I used post_vars just because it sounded good.

PROBLEMS FACED WITH THE ZOHO

  • Don't populate the MAP variable with one go using {"variable",value:"variable",value,"variable",value}.  For some reason I could not get it to work.  Do one by one.
These are the configuration variables you need to .put
variable            description
webname         The name of your website
                       example:    post_vars.put('webname',"My_Web_Site.com")
prog_dir           directory of pdftk.exe
                       if you leave it out the program will assume $dir_root=$_SERVER['DOCUMENT_ROOT']
nodatamsg       message if there is no data
                       default "No POST data detected!" if you leave it out
dir_root             root directory
                       default is $dir_root=$_SERVER['DOCUMENT_ROOT'] if you leave it out
fdf_dir               the directory where the form is
                       default $fdf_dir=dirname(__FILE__) if you leave it out
fdf_file               the name of the fdf file.. is the container for the pdf form data
                       default is $fdf_file='fdf_temp.fdf' if left out           
backgroundfile   the name of any background file which we will use to include pictures or watermarks for out pdfs
                        blank if you do not need it
pdf_doc             the name of your pdf from file
                        without this the program will terminate with error   
pdfoutput          the name you want to give to the output file
                        if left blank the output with go to standard devise which is print to screen
flatten               set to true in Zoho will cause the output file to be flattened (un editable)
                       the default if left is true set to false if you want editable output

KNOWN ISSUES AND PROBLEMS YOU CAN FACE
1) You web service provider doesn't allow programs like .exe to be executed on their server
2) Issues with folder access, make sure you set the read/write privileges for your .exe program
3) Basic mistakes in naming configuration variables
4) The PDF file must be able to receive data (FDF) output.


Step #6
Now you want to post your variables to your website and get the results back taking out the path and file name of the pdf document if you select document output v.s. screen.

mResult = postUrl("My_Web_Site.com/Zoho_Form_Processor.php", post_vars);
mURL = "http://" + (mResult.getSuffix("http://")).subString(0,((mResult.getSuffix("http://"))).lastIndexOf("<!DOCTYPE"));

Note: Green text indicates that you put your own names.


RESOURCE LIST
Inkscape vector graphic software download
Gimp 2.0 bitmap graphic software download
Openoffice free suite of applications for creating fdf type pdf forms
PDFTK utility tool to combine and flatten pdf file with fdf data
Codelobster PHP editing and debuggin program
Wampserver to allow PHP debugging on your system


































































































































    Access your files securely from anywhere







                            Zoho Developer Community




                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                  • Ask the Experts





                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • Functions

                                                                                        Functions

                                                                                      • Meetups

                                                                                        Meetups

                                                                                      • Kbase

                                                                                        Kbase

                                                                                      • Resources

                                                                                        Resources

                                                                                      • Digest

                                                                                        Digest

                                                                                      • CRM Marketplace

                                                                                        CRM Marketplace

                                                                                      • MVP Corner

                                                                                        MVP Corner







                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now


                                                                                            Zoho Show Resources

                                                                                              Zoho Writer

                                                                                              Get Started. Write Away!

                                                                                              Writer is a powerful online word processor, designed for collaborative work.

                                                                                                Zoho CRM コンテンツ



                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方




                                                                                                              • Recent Topics

                                                                                                              • [solved] #original_sender trick not working for us

                                                                                                                Hello community ! We really like DESK.. it's working like a charm for us but I have a request. Some users are sending emails personnaly to me (instead of using the support adress).. and I saw there was a possibilty to use : #original_sender {mail@mail.com}
                                                                                                              • SalesIQ Chat Notifications

                                                                                                                I am the admin of our salesIQ implementation. About two weeks ago, I started hearing/seeing notification for ALL chats messages from monitored agents/chat participants. I don't need to see these, we have a manager who deals with this. I can't stop the
                                                                                                              • Correlated subqueries not supported in Zoho Analytics. This creates huge limitations

                                                                                                                Running into a major limitation in Zoho Analytics: correlated subqueries simply don’t work, even in completely standard SQL patterns inside a JOIN. Example: LEFT JOIN "Bills" b ON d."Id" = b."Deal ID" AND EXISTS ( SELECT 1 FROM "Bill
                                                                                                              • Unknown table or alias 'A1'

                                                                                                                I would like to create a subquery but i am getting the following error: Unknown table or alias 'A1' used in select query. This is the sql statement:  SELECT A1.active_paying_customers, A1.active_trial_customers, A1.new_paying_signup, date(A1.date_active_customers), 
                                                                                                              • Batch Emails in CRM Plus without using a template?

                                                                                                                Hi guys. Is it possible to send the same email to multiple people at the same time within CRM Plus without using an email template? At the moment we create a custom view in Contacts to display the people that we need. We then click the boxes on the left, and click 'Send Mail', but always need to select a template. Sometimes its better to write a quick one off message, without needing to set up a template first. Thanks.
                                                                                                              • bank charge

                                                                                                                a charge to my account was made that I did not authorize, of $16.46, for something that looks like "computer maintenance or something to that matter". please refund.
                                                                                                              • [Free Webinar] Product Updates: Quick Catch-Up Session - Part II - Creator Tech Connect

                                                                                                                Hello Everyone! We welcome you all to the upcoming free webinar on the Creator Tech Connect Series. The Creator Tech Connect series is a free monthly webinar featuring deep-dive technical sessions designed for developers, administrators, and app builders.
                                                                                                              • Introducing Liquid Glass UI on the Zoho Mail iOS app

                                                                                                                Hello everyone! We're excited to announce that the Zoho Mail app is now fully optimised for iOS 26's Liquid Glass design on both iPhone and iPad! The updated interface features transparent layers, smooth animations, and refined visual elements that enhance
                                                                                                              • Plan change from Zoho One to Zoho Workplace

                                                                                                                Hello Zoho, Following the recent pricing update for Zoho One, we are interested in transitioning to Zoho Workplace products. Please inform us about the necessary steps for this process so we can proceed promptly. Kind regards,
                                                                                                              • Partner with HDFC And Sbi Bank.

                                                                                                                Hdfc and sbi both are very popular bank if zoho books become partner with this banks then many of the zoho books users will benefit premium features of partnered banks.
                                                                                                              • Links in Instagram

                                                                                                                Hi there, I have been using Later for a while now but keen to come back to Zoho Social as Later doesn't offer tagging of pages on Facebook but they offer something Zoho doesn't. You can add a link to your bio which opens up your profile feed where images
                                                                                                              • Spotlight #7 - Automatic Transitions in Blueprint

                                                                                                                Previously, records could not be moved from one state to another without user intervention. With automatic transitions, move records from one state to another automatically, when it elapses its pre-defined time. This Spotlight discusses how automatic
                                                                                                              • Sub Folders

                                                                                                                It would be great if there could be sub-folders in reports. We have a ton of individual reports and folders that would be easier to navigate this way 
                                                                                                              • Zoho CRM Community Digest - November 2025 | Part 2

                                                                                                                Hello Everyone! Second half of November brought several exciting updates, especially around Zia, making AI assistance smarter, faster, and more context-aware. We also feature engaging community snippets highlighting members who went the extra mile to
                                                                                                              • Zoho CRM - Writing Assistant Tone

                                                                                                                Hi Zoho CRM Team, Text in my emails often gets underlined in yellow because I tend to use a more informal tone with my client's, like using "I'm" instead of "I am". Is there some way for me to tell the system that this is my preferred writing tone, so
                                                                                                              • Hide Contact Number for Field Users & Agents

                                                                                                                Is it possible to hide the contact number in both the Service Appointment and Work Order modules for field users and agents? The agents are using the Zoho FSM mobile app, and we want to restrict them from viewing the contact number.
                                                                                                              • Zoho Flow Credits

                                                                                                                Hi , I would like to ask the reason why every time I added plus credit but few days later I will return back to default? (as below I add credit to 3000 but today It change back to 1000) Most important is, when the credit fully used, not any reminder to
                                                                                                              • Form Submission Emails

                                                                                                                Is there a current delay with submission emails being sent? We've had 10-20 forms completed today but only a handful of emails.
                                                                                                              • How to update Multi File upload field

                                                                                                                Assume that i have a multi file upload field,how can i update the same field again?
                                                                                                              • What is the simplest way to import PST to Yahoo Mail?

                                                                                                                The simplest way to import PST file into Yahoo Mail is to use a third-party tool that supports direct PST-to-Yahoo migration. Software like Aryson PST Converter lets you upload emails, contacts, attachments, and folders from a PST file straight into your
                                                                                                              • Subform edits don't appear in parent record timeline?

                                                                                                                Is it possible to have subform edits (like add row/delete row) appear in the Timeline for parent records? A user can edit a record, only edit the subform, and it doesn't appear in the timeline. Is there a workaround or way that we can show when a user
                                                                                                              • 【Zoho CRM for Everyone】設定画面のアップデート

                                                                                                                ユーザーの皆さま、こんにちは。コミュニティチームの藤澤です。 今回は「Zoho CRM アップデート情報」の中から、Zoho CRM for Everyone の設定画面のアップデート情報をご紹介します。 目次 設定ホーム画面の追加 設定画面での検索結果の表示形式の変更 設定画面でのよく使用する機能の表示 設定メニューの展開/折りたたみ状態の保持 1. 設定ホーム画面の追加 ホーム画面の設定項目は、直感的に分類できるように"カテゴリごと"で分けられています。 このような一元化された表示により、各ツールが1つの画面に集約され、必要な機能をより簡単に見つけられるようになりました。
                                                                                                              • What's New - November 2025 | Zoho Backstage

                                                                                                                A new month, a new set of updates. With a mix of new features and thoughtful improvements, you get smoother workflows and better control across registrations, exhibitors, and communications. Let's take a look at what's new and enhanced in Zoho Backstage
                                                                                                              • Zoho Checkout - Duplicate Customer record created for each payment received

                                                                                                                Hi All. We are using Zoho Checkout to capture online payments for a club membership form (in Zoho Forms). We've noticed that each new payment seems to create a new customer record, regardless of whether the customer already exists in the Zoho Finance
                                                                                                              • Zoho public comments are confusing and unnecessary

                                                                                                                Hi, we use zoho desk and have issues with public comments. We started using them because the "Reply" option just seemed very clumsy because of the following reasons: - the top "Reply" button starts what seems to be a regular email, showing the entire
                                                                                                              • Templates for Zoho Desk - Knowledge Base

                                                                                                                We are looking at migrating our Knowledge base into Zoho Desk. Is there a way of creating templates for article in Knowledge base. We want to be able to set templates for certain types of content. Is this possible
                                                                                                              • Import KB template OR Export template for zoho desk?

                                                                                                                Greetings. Can you tell me if there is a way to get an EXPORT of my KB articles? OR is there a template you supply for importing KB articles into my zoho desk? I am looking for a method of understanding what fields can be imported, and what their possible
                                                                                                              • What KPIs Do You Use to Measure Your Support Team’s Performance in Zoho Desk?

                                                                                                                Hi everyone, We hope you’re all doing well. We are trying to improve how we measure the performance and effectiveness of our support department, and we would really appreciate learning from the community. We assume there are several common and widely-used
                                                                                                              • Backorder quantity change

                                                                                                                New Purchase Order × Almost there, but... Quantity of items in this purchase order is greater than the quantity that can be backordered from that sales order. Why can't I change the quantity of a backorder purchase? It looks like a normal order form and I would like to use it as one because I increased the amount and added some items. 
                                                                                                              • How to Associate multiple contacts with deal in Sales Inbox

                                                                                                                Hello, I have many deals that have multiple potential customers associated with a single deal, for example an engineer and a manager. The manager is the Deal's primary contact in CRM and the Engineer is added to the deal in the "Contact Roles" Associated
                                                                                                              • Adding Taxes to paid consultations in Zoho Bookings

                                                                                                                I created a 'paid' consultation under Zoho Booking and integrated it with payment gateways for online/instant payment before a booking is done. How can I add 'taxes' to the price of consultation? I can add taxes to other Zoho apps (liks Books, Checkout,
                                                                                                              • WorkDrive and CRM not in sync

                                                                                                                1/ There is a CRM file upload field with WorkDrive file set as the source: 2/ Then the file is renamed in WorkDrive (outside CRM): 3/ The File in CRM is not synced after the change in WorkDrive; the file name (reference) in CRM record is not updated (here
                                                                                                              • "code": "500","description": "Account not exists", mail api

                                                                                                                I have been through all the steps and have a functioning Oath access_token etc etc... I then GET https://mail.zoho.com/api/organization And get my zoid then GET http://mail.zoho.com/api/organization/<hidden>/accounts and get the account details, which
                                                                                                              • RTL Support for Webforms in Zoho CRM

                                                                                                                Dear Zoho CRM Support Team, We are writing to request an enhancement to the webform builder functionality within Zoho CRM. Currently, to create a webform in a right-to-left (RTL) language, the entire CRM instance must be set to RTL, which can be inconvenient
                                                                                                              • Imported contacts succesful but contacts do not show up in Contacts

                                                                                                                I imported +300 contacts. I can see them in import history. When clicking on a contact in import history I see all the imported contact details for any given contact. So import seems to be successful.   However the imported contacts do not show up in the contacts tab. Not in All contacts, and not in a filtered view where they absolutely should show up. The search function also does not find any imported contact.   Help?
                                                                                                              • Update on V2 API End-of-Life Timeline

                                                                                                                Dear Users, Earlier this year, we shared the launch of the V3 APIs and requested users to migrate from the older V2 APIs by December 2025. We have received valuable feedback from our users and partners regarding their migration timelines. We are happy
                                                                                                              • Rich Text For Notes in Zoho CRM

                                                                                                                Hello everyone, As you know, notes are essential for recording information and ensuring smooth communication across your records. With our latest update, you can now use Rich Text formatting to organize and structure your notes more efficiently. By using
                                                                                                              • Saving sent email campaign as PDF

                                                                                                                I'm looking to add all campaigns sent to an archive folder in sharepoint. Is there anyway to accomplish this in Zoho Flow ? I'm falling at the first hurdle ... can I automatically save a sent campaign as a PDF to a folder location ?
                                                                                                              • Zoho Voice lance BYOC (Bring Your Own Carrier) : intégrez votre opérateur

                                                                                                                Pour accompagner sa croissance, une entreprise a besoin d’une infrastructure téléphonique flexible et évolutive. Les solutions de téléphonie s’adaptent aux exigences du centre de contact, tout en intégrant aisément les opérateurs locaux de votre choix.
                                                                                                              • Digest Novembre - Un résumé de ce qui s'est passé le mois dernier sur Community

                                                                                                                Bonjour chers utilisateurs, Avec l'arrivée du dernier mois de l'année, il est temps de résumer les activités de novembre dans la communauté Zoho France. Ce mois-ci, Zoho Webinar se dote de deux nouvelles intégrations ! La première est avec Zapier : connectez
                                                                                                              • Next Page