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

                                                                                                              • Copy, Paste, Highlighted text

                                                                                                                when i copy paste text it gets highlighted. Fix this.  WTF is with this black highlight ? Fix copy pasting. Some people pay for using this mail service. 
                                                                                                              • Pricing Strategies: #6 Common Mistakes while Configuring Pricing

                                                                                                                "Why does this month's billing feel messy again?" That was the exact line Priya muttered while staring at the spreadsheet full of edited pricing, one-off discounts and mismatched subscription details. Her business was growing, but the pricing machine
                                                                                                              • Publish to LinkedIn via API

                                                                                                                Hi, Is it possible to publish a job opening to LinkedIn (paid job slots) if creating a job opening via api / deluge function? Or is the user required to manually publish via the job boards process? Many Thanks Adrian
                                                                                                              • FSM - Associating and selecting Contacts based on Service Addresses

                                                                                                                Hi FSM team, I've come across an FSM limitation I wanted to share for improvement. I'm currently configuring FSM for a client who provides heating system install and maintenance services. The are often sub contracted by building management companies to
                                                                                                              • 日本語フォントの選択肢拡充についての要望

                                                                                                                日本語フォントの選択肢がとても少ないと感じたことはありませんか? 多くのアプリ(たとえば Invoice)ではフォントが1種類しかなく、正直あまり使いやすい・見た目が良いとも言えません。 そろそろ、もっと多くの日本語フォントを追加してほしい、そしてすべてのアプリで同じフォント選択肢を使えるようにしてほしいと、私たちユーザーが声を上げる時期だと思います。 ご存じのとおり、現状ではアプリごとにフォント周りの仕様にほとんど一貫性がありません。 みなさん、一緒に要望を出していきましょう!
                                                                                                              • Do Unpublished Products in Shopify Sync to Zoho POS?

                                                                                                                Will an unpublished product in Shopify sync to Zoho POS? I would like to know how Zoho POS handles products that are in draft/unpublished status in Shopify.
                                                                                                              • Problem in Zoho POS frontend ERP.

                                                                                                                We are facing some difficulties in our billing and inventory processes and require your support to resolve them at the earliest. Customer Advance Payments We receive advance payments from customers for upcoming sales. Please guide us on how to record
                                                                                                              • How to create estimates/Invoices with sub-totals

                                                                                                                Every other accounting package can create estimates and invoices with Sub-totals. How can I do that in ZohoBooks?
                                                                                                              • Categorize Items with Item Headers

                                                                                                                Hello customers, Did you ever want to classify items based on specific categories to help your customers understand your invoice better? With the new Item Header feature, you can easily categorize items in your invoices and estimates and give them a common title.  Item Headers are available in the Invoices, the Recurring Invoices and the Estimates module. It can be carried forward from estimates to invoices at the time of converting the estimates.  To add an item header: Go to the Estimates, Invoices
                                                                                                              • Emails sent through Bigin are not posting in IMAP Sent folder

                                                                                                                I have set up my email to work from within Bigin using IMAP.  I am using IMAP so I can sync my email across multiple devices - phone / laptop / desktop / iPad / etc.  I want all my emails to populate my email client (outlook & iphone email) whether or
                                                                                                              • Ask the Experts 26: Brighten every customer interaction with Zoho Desk all year long

                                                                                                                Hello everyone, Greetings and welcome to Ask the Experts 26. As we wrap up 2025, we are excited to invite you to the 26th episode of our Ask the Expert series. 🎄The Merry Metrics Edition = Best of Zoho Desk [Best Practices + Holiday Automation + Year-End
                                                                                                              • Painfully Slow Zoho mail

                                                                                                                Since yesterday Zoho Mail seems to have starting functioning very slowly and having a few bugs. It's slow to open mails, slow to send, slow to change between email accounts. Sometimes clicking on a particular folder (eg Sent folder) stops working and
                                                                                                              • Discount on the transaction level in POS

                                                                                                                "Is it possible to apply a discount on the total bill before tax in Zoho POS?" I want to apply a discount on the total transaction amount in Zoho POS, but the discount should be calculated before the taxes are applied. Is there an option to do this in
                                                                                                              • Zoho DataPrep switching Date Format

                                                                                                                When using a pipeline that is importing Zoho Analytics data into Zoho DataPrep, the month and day of date fields are switched for some columns. For example, a Zoho Analytics record of "Nov. 8, 2025" will appear in Zoho DataPrep as "2025/08/11" in "yyyy/MM/dd"
                                                                                                              • Create Tasklist with Tasklist Template using API v3

                                                                                                                In the old API, we could mention the parameter 'task_template_id' when creating a tasklist via API to apply a tasklist template: https://www.zoho.com/projects/help/rest-api/tasklists-api.html#create-tasklist In API v3 there does not seem to be a way to
                                                                                                              • Send Automated WhatsApp Messages and Leverage the Improved WhatsApp Templates

                                                                                                                Greetings, I hope all of you are doing well. We're excited to announce a major upgrade to Bigin's WhatsApp integration that brings more flexibility, interactivity, and automation to your customer messaging. WhatsApp message automation You can now use
                                                                                                              • Jobs at multiple locations

                                                                                                                Hi A lot of times we have same job open at multiple locations. So I would like an option where we can create a job and choose multiple locations. Currently we have to create individual jobs for each location. If we can create one job and mention multiple
                                                                                                              • From Zoho CRM to Paper : Design & Print Data Directly using Canvas Print View

                                                                                                                Hello Everyone, We are excited to announce a new addition to your Canvas in Zoho CRM - Print View. Canvas print view helps you transform your custom CRM layouts into print-ready documents, so you can bring your digital data to the physical world with
                                                                                                              • Passing the CRM

                                                                                                                Hi, I am hoping someone can help. I have a zoho form that has a CRM lookup field. I was hoping to send this to my publicly to clients via a text message and the form then attaches the signed form back to the custom module. This work absolutely fine when
                                                                                                              • Tag Adding Option in Kanban Card Customization Bigin CRM Mobile App

                                                                                                                I would like to request an option to add and display tags on Kanban cards in the Bigin CRM mobile app. This feature would make it easier to categorize deals and quickly identify priorities while working on the go.
                                                                                                              • Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM

                                                                                                                Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals
                                                                                                              • WhatsApp Voice Message Sending Option in Bigin CRM

                                                                                                                I would like to request a feature that allows users to send WhatsApp voice messages directly from Bigin CRM. This would help improve communication efficiency and make it easier for teams to respond quickly to customer inquiries.
                                                                                                              • CRM: hosting a single html file in Zoho and displaying it as a widget

                                                                                                                I have seen that CRM offers the option of uploading a web project to Zoho itself and displaying it as a widget in CRM. The instructions then talk about setting a development environment with Node and developing an application to upload to Zoho. But I
                                                                                                              • Synchronise item image between Zoho Commerce and Zoho Books/Inventory/CRM

                                                                                                                Here is a blindingly simple idea to tie several Zoho products together. Zoho - please include a method to synchronise the item image (or images) from one Zoho application to another. For example, if you upload an item image in Zoho Inventory, a user should
                                                                                                              • How to change position button transtition of Blueprint?

                                                                                                                Hi Everyone, Look at my screenshoot, it is possible move the reject button to the right? I couldn't find that setting in the blueprint. Thank you.
                                                                                                              • Marketer’s Space - WhatsApp Pricing Update: What Marketers Need to Know and Do

                                                                                                                Hello Marketers, Welcome back to Marketer’s Space! WhatsApp made changes to their pricing model on July 1, 2025, moving from conversation-based pricing to a per-message pricing model. This week’s post focuses on what these changes mean for your WhatsApp
                                                                                                              • Multi file upload

                                                                                                                Hi, I just wonder if one could upload multiple files in one shot, say between one and three files, without adding multiple File Upload fields? Thanks, Alalbany
                                                                                                              • Sorting Descending in a lookup

                                                                                                                I have a case number lookup on multiple forms. I need the most recent added to appear at the top of the lookup or as the list of cases grom it's too much to scroll. Is there a way to have a look up sort descending?
                                                                                                              • Importing customer comments and multiple shipto addresses

                                                                                                                I am evaluating Zoho Books and have most of my data imported with two exceptions: (1) Import customer comments - in my current system I have several comments of different types, and I need to bring these into Zoho. Preferably Books customer records, but
                                                                                                              • Can we add custom fields to portal community profiles?

                                                                                                                How do we add custom fields to our profile pages in our portal community? If we have the ability to add custom fields, will we be able to access those fields via API? We want to use our Desk community in our help portal as our primary community and would
                                                                                                              • Auto-upload Creator Files to WorkDrive

                                                                                                                Hi everyone, I’m working on a workflow that uploads files from Zoho Creator to specific subfolders in Zoho WorkDrive, as illustrated in the attached diagram. My Creator application form has two multi-file upload fields, and I want—on successful form submission—to
                                                                                                              • Asap Widget 2.0

                                                                                                                Where's the documentation for the new ASAP widget? https://www.zoho.com/desk/developers/asap/#introduction this one is outdated How can we dynamically navigate between different views? How can we prefill ticket forms using ASAP 2.0?
                                                                                                              • Update date & time when a cell is edited

                                                                                                                Hi All, I am desiring to have a cell update with the current date and time when another cell is edited. Any ideas?  Thank you
                                                                                                              • CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive

                                                                                                                Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
                                                                                                              • Can the Trigger be changed?

                                                                                                                I'm afraid I already know the answer, but here goes... After activating a workflow (under Campaigns > Automations), Then later choosing to Edit the workflow, Can the Workflow's Trigger be changed? Currently the entire Trigger section + options are gone
                                                                                                              • Marketer's Space: Proven tips to improve open rates – I

                                                                                                                Hello Marketers! Welcome back to another post in Marketer's Space! In this week's post, we'll discuss the ever-important concept of open rates. This will be a multi-part series, as we have a range of topics to cover. Open rates—which measure the percentage
                                                                                                              • Creating Custom PDF Template from Form

                                                                                                                I am trying to create a custom PDF from form submissions. I have the standard subscription and it indicates that PDF forms are included. I cannot find anywhere to create PDF forms. I try to follow the instructions from here: https://help.zoho.com/portal/en/kb/forms/form-settings/pdf-settings/pdf-editor/articles/creating-your-own-pdf-template#Creating_your_template_from_the_scratch
                                                                                                              • Important Update: Facebook Metrics Deprecation & Impact on Zoho Analytics

                                                                                                                Dear Zoho Analytics users, Facebook has deprecated a set of metrics from the Facebook Pages Insights API, effective November 15, 2025. As a result, these changes will affect any reports and dashboards in Zoho Analytics that rely on Facebook Pages data.
                                                                                                              • Quick Copy Column Name

                                                                                                                Please add the ability to quickly copy the name of a column in a Table or Query View. When you right-click the column there should be an option to copy the name, or if you left-click the column and use the Ctrl+C keyboard shortcut it should copy the
                                                                                                              • Conditional Field Visibility in Bigin CRM

                                                                                                                I would like to request support for conditional field visibility within Bigin CRM. This feature should allow administrators to configure show/hide rules for fields based on predefined criteria (e.g., field values, picklist selections, stage changes,
                                                                                                              • Next Page