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

                                                                                                              • 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,
                                                                                                              • Introducing Zoho MCP for Bigin

                                                                                                                Hello Biginners! We're excited to introduce Zoho MCP for Bigin, a completely new way of interacting with Bigin data using AI. With Zoho MCP, you can securely connect your Bigin account with popular AI agents like Claude, Cursor, Windsurf, and VS Code,
                                                                                                              • Introducing the Zoho Projects Learning Space

                                                                                                                Every product has its learning curve, and sometimes having a guided path makes the learning experience smoother. With that goal, we introduce a dedicated learning space for Zoho Projects, a platform where you can explore lessons, learn at your own pace,
                                                                                                              • MCP > Creator connection failing with Claude

                                                                                                                I'm trying to get claude to access any of my Zoho Creator apps and it keeps failing. I have enabled all tools for creator and ensured in claude settings that everything is authorised. Here is what claude says : Unfortunately, the error messages I'm receiving
                                                                                                              • Is it possible to sync data every 5–10 minutes in Zoho Analytics (CRM or Excel imports)?

                                                                                                                Hello Team, I want to know if Zoho Analytics supports near real-time syncing of data from different sources. My requirements: I am importing data from Zoho CRM → Zoho Analytics I also have some datasets maintained in Excel/CSV I want both data sources
                                                                                                              • Feature Request: Dynamic Dimension Control for zc_LoadIn Popups

                                                                                                                As detailed in this community discussion, Zoho Creator's zc_LoadIn parameter is a vital tool for opening components (forms, reports, or pages) in modal dialogs via HTML snippets, Notes, or Rich Text Fields. While powerful, this feature suffers from a
                                                                                                              • Subforms in stateless forms

                                                                                                                I think the title says it all. We need to be able to add subforms to stateless forms. Currently the only workaround is to create a Form and delete each record upon submission of the form. I need to build an interface to update our inventory. Basically
                                                                                                              • Text wrap column headers in reports?

                                                                                                                Is it possible to auto wrap column headers so that a longer multi-word header displays as two lines when the column is narrower than the width of the header title?
                                                                                                              • What’s New in Zoho Inventory — Latest Features, Integrations & Updates | December 2025

                                                                                                                Zoho Inventory has evolved significantly over the past months, bringing you smarter, faster, and more connected tools to streamline your operations. Whether you’re managing multichannel sales, complex fulfillment workflows, or fast-moving stock, our newest
                                                                                                              • Marketer’s Space - Multi-Channel Campaigns for the Biggest Shopping Week with Zoho Marketing Automation

                                                                                                                Hello marketers, Welcome back to another post in Marketers Space! The biggest shopping week of the year is almost here, and it’s your moment to shine without the stress. With Black Friday and Cyber Monday just around the corner, being present across email,
                                                                                                              • Auto-Invite Users to Portals in Zoho CRM based on Conditions

                                                                                                                Hello Everyone, You can now automate portal invitations in Zoho CRM with the new Auto-Invite users feature in Portal management. No more manually enabling portal access one by one. With this enhancement, you can automatically send invites for users to
                                                                                                              • Pricing Strategies: #5 Stay local, Price & Sell Global

                                                                                                                Arun had always dreamed of taking his handmade craft business beyond his hometown. For years, he sold locally. Most of his customers are familiar faces, in our usual currency and with the exact expectations. But one day, a traveller visited his workshop
                                                                                                              • Best practice to structure reporting to include events covering multiple months / quarters.

                                                                                                                Hi, I'm new to Zoho, have some experience of more "enterprise" tools, looking for some input from the community. I'm looking to create a report that includes events that cover a long period, each event has a start / end date and I'm struggling undertanding
                                                                                                              • Incorrect Email Notifications for Product Reviews

                                                                                                                Dear Zoho Commerce Support Team, I am writing to report a technical issue that occurs frequently on our platform. Problem Description: We regularly receive email notifications informing us of new product reviews awaiting approval. However, when we access
                                                                                                              • Zoho CRM for Everyone's NextGen UI Gets an Upgrade

                                                                                                                Hello Everyone We've made improvements to Zoho CRM for Everyone's Nextgen UI. These changes are the result of valuable feedback from you where we’ve focused on improving usability, providing wider screen space, and making navigation smoother so everything
                                                                                                              • What is the easiest way to move Hotmail emails to an IMAP server?

                                                                                                                The easiest way to move Hotmail (Outlook.com) emails to an IMAP server is to add your Hotmail account directly to any email client that supports IMAP, then copy the messages across. This avoids paid tools and keeps the process simple. Fastest free method:
                                                                                                              • No feedback from Zoho Books regarding Yodlee feeds for Investec

                                                                                                                I reported on 6 Feb 2025 that the Bank Feeds for Investec bank via Yodlee are not working. To date there has been no resolution. You are charging us for a suite of products where the functionality does not work. Please advise how you will refund me for
                                                                                                              • Turn off Knowlege Base Follow options and Follower lists

                                                                                                                Is there a way to hide or turn off the option in the Knowledge Base for users to follow specific departments/categories/sections/articles? If not, is there a way to turn off the public list of followers for each of those things? Otherwise, customer names
                                                                                                              • Custom validation in CRM schema

                                                                                                                Validation rules in CRM layouts work nicely, good docs by @Kiran Karthik P https://help.zoho.com/portal/en/kb/crm/customize-crm-account/validation-rules/articles/create-validation-rules I'd prefer validating data input 'closer to the schema'
                                                                                                              • Meet Canvas' Grid component: Your easiest way to build responsive record templates

                                                                                                                Visual design can be exciting—until you're knee-deep in the details. Whether it's aligning text boxes to prevent overlaps, fixing negative space, or simply making sure the right data stands out, just ironing out inconsistencies takes a lot of moving parts.
                                                                                                              • Text snippet

                                                                                                                There is a nice feature in Zoho Desk called Text Snippet. It allows you to insert a bit of text anywhere in a reply that you are typing. That would be nice to have that option in Zoho CRM as well when we compose an email. Moderation Update: We agree that
                                                                                                              • Zoho Books "Update" Trigger for Zapier?

                                                                                                                Hi Zoho Team, I've been in talks with Zapier about using their services to connect my Zoho Books account to various apps, but I require an additional trigger beyond the "New" trigger. I require an "Update" trigger, which will allow me to filter and create Zaps only when certain conditions are fulfilled on the Zoho Books end before I automate a separate app. Specifically this will help me create invoices in QuickBooks Online only when payments are recorded in Zoho Books, rather than when a new invoice
                                                                                                              • Service One. Bill Another. Zero Hassle.

                                                                                                                In field service operations, one challenge often comes up: the person who needs the service isn’t always the one who pays for it. Think about tenants vs. property managers, corporate offices vs. their finance departments, or school buildings vs. central
                                                                                                              • Time Tracking on Iphone doesn't stop

                                                                                                                When I start a time tracking session the timer starts as expected. However when I hit stop, the timer remains on that project. The only buttons available are discard and start. Start runs the timer more and discard says it will throw away the data from
                                                                                                              • Presenting ABM for Zoho CRM: Expand and retain your customers with precision

                                                                                                                Picture this scenario: You're a growing SaaS company ready to launch a powerful business suite, and are looking to gain traction and momentum. But as a business with a tight budget, you know acquiring new customers is slow, expensive, and often delivers
                                                                                                              • Can we do Image swatches for color variants?

                                                                                                                We want to do something like the attached screenshot on our new zoho store. We need image swatches instead of normal text selection. We want to user to select an image as color option. Is this doable? I don't see any option on zoho backend. Please h
                                                                                                              • Can Zoho Flows repeat Actions more than once?

                                                                                                                I'm attempting to make an intentional Zoho Flow loop using the below layout. However, when "WithinLimit" condition is met, the program fails to execute the action "Get & Add Request Co..." again. Is this by design? Is Zoho Flows unable to repeat actions
                                                                                                              • Video interviews not compatible on mobile

                                                                                                                Hi Zoho,  The 2-way video interview feature you have added to Recruit would be great if the candidate was able to use the link to the video on a mobile phone, it doesn't work on Samsung browser, it doesn't work on chrome/firefox mobile version of browser,
                                                                                                              • What is the difference between Zoho Campaigns and marketing hub?

                                                                                                                Zoho Campaigns is a permission-based email marketing tool for sending marketing emails and mass emails. Marketing Automation is a multichannel marketing automation tool that caters to organizations looking for tools to engage their users across multiple
                                                                                                              • Zoho Desk View Open Tickets and Open Shared Tickets

                                                                                                                Hi, I would like to create a custom view so that an agent can view all the open tickets he has access to, including the shared tickets created by a different department. Currently my team has to swich between two views (Open Tickets and Shared Open Tickets).
                                                                                                              • Enviro Recycling EHF Fee's

                                                                                                                ​​I'm in Canada and each province has it's own recycling program with it's own fee's. There are numerous categories that electronics fall into and each category has a taxable rate applied to it. I need a way to be able to apply the correct rate depending
                                                                                                              • Change of Blog Author

                                                                                                                Hi, I am creating the blog post on behalf of my colleague. When I publish the post, it is showing my name as author of the post which is not intended and needs to be changed to my colleague's name. How can I change the name of the author in the blogs?? Thanks, Ramanan
                                                                                                              • Zoho Desk API - Influence which layout is used

                                                                                                                Hello, how can the ticket layout be changed using the API? I would like to choose the layout directly when creating the ticket. If this is not possible, my question would be how can I change it afterwards? Best regards, Sven
                                                                                                              • Has CSS Changed for Common Elements?

                                                                                                                I noticed today that the standard title headings on my Forms and Reports display smaller in size than before. Google Dev Tools (attached), seems to confirm my suspicion. Something appears to be overriding the 1.375rem to 1.125rem. The font size on the
                                                                                                              • Text field alignment

                                                                                                                Is it possible to align text in the text field? Or even better, is there a possibility to have a field which accepts only numbers?
                                                                                                              • email moderation issue when email is sent in the name of a mail group

                                                                                                                Symptom: an email that is sent by a mail group moderator in the name of a moderated mail group is held back for approval. Reproduction: Create a moderated mail group with members and moderators. Allow that mails can be sent in the name of the group (extended
                                                                                                              • Pipeline in Custom Modules

                                                                                                                I love the way the Sales Pipeline looks and functions with reports. I would like to add the save pipeline features and visualization to a custom module, however, I only see that these pipelines are only available for the Deals module. Is there a way to add pipelines to custom modules?
                                                                                                              • Duplicate customers being created in Desk

                                                                                                                Hi I've trying to work out why I've getting duplicated customers being created in my desk. I have an external booking system that generates an email when I get a customer booking a job. A booking email gets sent to Desk where I manage the booking and
                                                                                                              • Tip #53- Remote Billing: Your End-to-End Billing Solution in Zoho Assist- 'Insider Insights'

                                                                                                                Manual invoicing, after every remote support session, can be time-consuming and often error-prone. As an MSP, IT admin, or even a freelance support technician, it may become overwhelming to keep track of session time, service rates, and client invoices.
                                                                                                              • Record history and ticket interaction tab in contacts and accounts

                                                                                                                Hello everyone! We have improved the History tab to help users trace updates in the interaction activity logs of the Contacts and Accounts detail pages in the Customer Module. This enhancement make it easier to get clear details about who made each update,
                                                                                                              • Next Page