PDF Generation with database fields

Hi!
Well I have some questions and I was wondering if someone
would be kind enough to answer. Here it goes.
Scenario:
The company that I work for is a non-profit educational
institution. They wish to do a tax receipts project in which a
student can log on to our website and get a tax receipt for all the
courses they've take with us in the calendar year.
The data for the student resides in a SQL Server 2000
database table. The tax receipt has to be presented in a PDF
format. We have a PDF template that we have to use. Essentially,
the PDF template has to populated with values from the database.
Technical Environment: CF7, SQL 2K, Win 2003 Server, IIS 6.
Constraints: output has to be PDF format, can't upgrade to
CF8
Question 1:
Can a PDF document be populated with values from a database
in ColdFusion 7??
Question 2:
If so, o you know of a book/website in which this type of
work is detailed (a how-to)?
Question 3:
If the answer is "no" to the above, is there a tool that can
be used to accomplish this?
Thank you in advance! :)
Jolmes

> Does anyone know if XPAAJ.jar is still available for CF7
users?
No, I do not. For forms, you could do something similar with
iText. An older version of it is built into MX 7. Here is an
adaptation of a simple java example from the iText site. Google for
more examples.
http://cfsearching.blogspot.com/2007/12/getting-started-with-itext-part-15.html

Similar Messages

  • Populating a PDF file with Database Field values - URGENT PLEASE REPLY

    I have a requirement where in I hae PDF files as templates. The data for these templates is the database.
    Example : a.pdf
    Name :
    Database table : name varchar(20)
    What I want to do is read this PDF template and populate the Name with the value in the table.
    Any Ideas on how to do this. Pointers/Source code would be appreciated. Hve been scrambling my head for quite a while without any luck

    not a portal question..
    u will need some pdf library / api - such as itext, etc

  • Link metadata with database fields

    Can I - and how - link metadata fields (as they will appear in the PDF properties) with database fields?

    You'll need to read about Adobe Extensible Metadata Platform format (XMP). Start here:
    Adobe XMP in depth

  • Name the PDF file with a field name

    Hi,
    I'm new to ES2 and Form creation in LiveCycle, my knowledge in scripts is very less or none i can say, if any one out there could help me out with this i'd be greateful.
    I have created a fillable PDF Form using LivecCycle ES2 and would like to know how to name the PDF file with a field value from the form when " save form " or " submit " button are clicked.
    Thanks in advance.
    Mithun.M.I

    You can save the form with name generated from a field's value, but therefore you will have to install a folder level script first and design a custom save button in your form.
    You cannot do this with the applications save or save as... buttons, and you also cannot rename a file on submit.
    Here's an example form and a folder level script. (Maybe to complicated fdr newbies)
    http://thelivecycle.blogspot.com/search/label/Save

  • How to create pdf files with text field data

    how to create pdf files with text field data

    That looks like it should work, but it doesn't.
    I opened the PDF I had created from Word in Acrobat (X Pro). Went to File > Properties. Selected "Change Settings". I then enabled "Restrict editing...", set a password, set "Printing Allowed" to "none", "Changes Allowed" to "none", and ensured that "Enable copying of text..." was disabled.
    I saved the PDF file, closed Acrobat, opened the PDF in Reader, and I was still able to select text and graphical objects.
    I reopened the PDF in Acrobat, and the document summart still shows everything as allowed. When I click on "show details" (from File > Properties) it shows the correct settings.
    Any ideas?

  • Populating a PDF form with database data

    I would love to know how (if possible) to populate an Adobe PDF form with data pulled from an Access database.
    Background
    I have a registration form already created using Adobe LiveCycle which is used by people to fill in their details.  With a built-in xml schema, the user saves the form and sends them to me.  I extract the data into an xml document which I can then import in an Access database using VBA code.
    The Need
    When it comes time to re-register, much of the original data provided by the user has not changed.  Rather than ask them to fill out the form all over again, I would like to send them their original data and they can update whichever fields they need to.  With the xml schema built into the form, I would love to turn this form into a two-way avenue for both importing and exporting data.  Is this possible?
    Any assistance in this matter would be greatly appreciated.  Please let me know if I have not provided enough information.
    Brett

    You can connect the form to the DB using anODBC connection. This functionality comes as part of Acrobat but the form must be Reader Extended by the full LiveCycle Server version of Reader Extension to allow this in Reader. In your case, if your system is the only on ethat will interact with the DB then this might be a viable solution (but you woudl have to use Acrobat). This solution woudl involve create an ODBC connection in your system then configuring the form to make use of that connection.
    Does that make sense?
    Paul

  • PDF generation with FOP throws NPE

    Hi,
    Stack trace
    at oracle.xml.jaxp.JXTransformer.reportXSLException(JXTransformer.java:769)
    at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:342)
    I'm using standard Java 1.4 API calls to create a PDF document from a DOM with Apache FOP 0.20.5.
    The servlet is deployed to Oracle 10g Application Server 9.0.4.0.0. With Tomcat 4.1.30 the same code executes without exceptions
    Because I have to port our web application to Oracle for a new customer it is important for me to get this fixed soon.
    Thank you
    Eckard

    Light at the end of the tunnel: It seems to work when FO and PDF generation are separated. Until now the DOM was piped into FOP who internally created the FO from SAX events and then seems to parse it again to create PDF.
    I separated the two steps: There is no problem in FO generation, but due to a namespace problem subsequent parsing fails
    ("org.apache.fop.apps.FOPException: null:2:10 Root element is missing the namespace declaration: http://www.w3.org/1999/XSL/Format")
    Now the correct exception comes up. Whether FOP SAX event listener is buggy or XML parser's error handling has a problem, I don't know
    Thank you anyway
    Eckard

  • Interactive pdf form with text fields. Chinese fonts

    Hi All
    We have designed an interactive pdf with text fields. We need the text fields to be in a Chinese font. I understand that this cant be done in Indesign (change the inputting font to Chinese) I have moved the file over to Acrobat Pro and used the text property to amend the font to Simsun but when we try it out the font is still in English. Any ideas on how to remedy the problem??
    Thank you in advance
    Paul

    Basically, you need to create a pdf form.
    Add a text field to your form.
    There you can choose which font your want the text to appear in.
    The trick is, when you export from InDesign, in the "Advanced Tab" — set "Subset fonts when percentage…" to 0%, so the whole font embeds.'
    I believe there's an option in Acrobat to embed the font as well, but I'm not recalling what it it.
    But that will ensure the font appears correctly.
    d

  • Combing PDF forms with identical field names while retaining unique values.

    I have several PDF files of the same form that has been filled out by multiple users. I need to create a combined file of all the responses for reporting purposes. However, the forms (obviously) all have the same field names, and when I combine them the values of the first form autofill the values of the matched fields on the other forms. I need a way to combine the forms while retaining the unique field values. I thought I could write a js to rename the fields, but that isn't possible.
    *EDIT: The fields need to retain editability because some contain long, scrolling text. Flattening or read-only isn't an option, not that either fixes the above problem.
    Suggestions?

    UPDATE:
    I solved this problem, at least for my own needs. Following try67's advice in a related post, I had to delete the existing fields and create new ones with new names. Given my desired outcome, this meant collecting all of the field properties of the fields (with some variation by field type), storing it, erasing the existing fields, and using that stored information to create new, identical fields (again with some variation by field type). Since I didn't want to retain actions or javascript, this was a perfect solution. I also no longer needed the buttons to function (since I wasn't retaining their javascript), so I made them read-only. I'm listing my working code below, in case anyone else could benefit from some or all of it.
    My question to the community is this: Why doesn't Adobe allow for fields to be renamed via javascript? Is it a security issue? My life would have been a lot easier the last few days if I could simply rename existing fields.
    The following script is used in a Combine Files action via the Action Wizard. The PDF optimizer is also used to strip out or flatten additional items.
    //This script is used to rename all the fields in a document while also removing any javascript or actions associated with those fields. Makes buttons read only without renaming.
    //Function to create a random alphanumeric ID.
    function makeid(n) {
        var text = "";
        var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
        for( var i=1; i <=n; i++ )
            text += possible.charAt(Math.floor(Math.random() * possible.length));
        return text;
    //List variables for collecting arrays of field properties.
    var fieldNum = this.numFields;
    var fieldNameArray = new Array();
    var fieldTypeArray = new Array();
    var pageNumArray = new Array();
    var fieldRectArray = new Array();
    var fieldValueArray = new Array();
    var borderStyleArray = new Array();
    var borderColorArray = new Array();
    var borderThicknessArray = new Array();
    var fillColorArray = new Array();
    var textColorArray = new Array();
    var textFontArray = new Array();
    var textSizeArray = new Array();
    var textAlignmentArray = new Array();
    var textMultilineArray = new Array();
    var checkmarkStyleArray = new Array();
    var radiowidgetNumArray = new Array();
    var radiowidgetRectArray = new Array();
    var radiowidgetPageNumArray = new Array();
    //Get the properties of all the current fields, including widgets.
    for (var i = 0; i < fieldNum; i++) {
        var currentField = this.getNthFieldName(i);
        fieldNameArray[i] = makeid(5);
        fieldTypeArray[i] = this.getField(currentField).type;
        borderStyleArray[i] = this.getField(currentField).borderStyle;
        borderColorArray[i] = this.getField(currentField).strokeColor;
        borderThicknessArray[i] = this.getField(currentField).lineWidth;
        fillColorArray[i] = this.getField(currentField).fillColor;
        textColorArray[i] = this.getField(currentField).textColor;
        textFontArray[i] = this.getField(currentField).textFont;
        textSizeArray[i] = this.getField(currentField).textSize  
        if (this.getField(currentField).type == "text") {
            fieldRectArray[i] = this.getField(currentField).rect;
            pageNumArray[i] = this.getField(currentField).page;
            fieldValueArray[i] = this.getField(currentField).value;
            textAlignmentArray[i] = this.getField(currentField).alignment;
            textMultilineArray[i] = this.getField(currentField).multiline;
        if (this.getField(currentField).type == "checkbox") {
            fieldRectArray[i] = this.getField(currentField).rect;
            pageNumArray[i] = this.getField(currentField).page;
            fieldValueArray[i] = this.getField(currentField).value;
            checkmarkStyleArray[i] = this.getField(currentField).style;
        if (this.getField(currentField).type == "radiobutton") {
            checkmarkStyleArray[i] = this.getField(currentField).style;
            fieldValueArray[i] = this.getField(currentField).value;
            var n = 0;
            while (this.getField(currentField + "." + n) != null) {
                radiowidgetNumArray[n] = this.getField(currentField + "." + n).name;
                n++;
            for (x = 0; x < radiowidgetNumArray.length; x++) {
                radiowidgetRectArray[x] = this.getField(radiowidgetNumArray[x]).rect;
                radiowidgetPageNumArray[x] = this.getField(radiowidgetNumArray[x]).page;
    //Delete all the current fields, except for buttons, which become read-only.
    for (var i = (fieldNum - 1); i > -1; i--) {
        var currentField = this.getNthFieldName(i);
        if (this.getField(currentField).type != "button") {
            this.removeField(currentField);
        } else {
            this.getField(currentField).readonly = true;
    //Using the stored arrays of field properties, generate new, identical fields.
    for (var i = 0; i < fieldNum; i++) {
        if (fieldTypeArray[i] == "text") {
            var newField = this.addField(fieldNameArray[i], fieldTypeArray[i], pageNumArray[i], fieldRectArray[i]);
            newField.value = fieldValueArray[i];
            newField.borderStyle = borderStyleArray[i];
            newField.strokeColor = borderColorArray[i];
            newField.lineWidth = borderThicknessArray[i];
            newField.fillColor = fillColorArray[i];
            newField.textColor = textColorArray[i];
            newField.textFont = textFontArray[i];
            newField.textSize = textSizeArray[i];
            newField.alignment = textAlignmentArray[i];
            newField.multiline = textMultilineArray[i];
            newField.doNotSpellCheck = true;
        if (fieldTypeArray[i] == "checkbox") {
            var newField = this.addField(fieldNameArray[i], fieldTypeArray[i], pageNumArray[i], fieldRectArray[i]); 
            newField.value = fieldValueArray[i];
            newField.borderStyle = borderStyleArray[i];
            newField.strokeColor = borderColorArray[i];
            newField.lineWidth = borderThicknessArray[i];
            newField.fillColor = fillColorArray[i];
            newField.textColor = textColorArray[i];
            newField.textFont = textFontArray[i];
            newField.textSize = textSizeArray[i];
            newField.style = checkmarkStyleArray[i];
            newField.readonly = true;
        if (fieldTypeArray[i] == "radiobutton") {
            for (y = 0; y < radiowidgetNumArray.length; y++) {
                var newField = this.addField(fieldNameArray[i], fieldTypeArray[i], radiowidgetPageNumArray[y], radiowidgetRectArray[y]);
                newField.value = fieldValueArray[i];
                newField.borderStyle = borderStyleArray[i];
                newField.strokeColor = borderColorArray[i];
                newField.lineWidth = borderThicknessArray[i];
                newField.fillColor = fillColorArray[i];
                newField.textColor = textColorArray[i];
                newField.textFont = textFontArray[i];
                newField.textSize = textSizeArray[i];
                newField.style = checkmarkStyleArray[i];
                newField.readonly = true;           
    //End script.

  • Optimize a PDF doc with form fields

    Hi All,
    I have completed a PDF with multiple form fields (about 70). It's only one 8.5 x 11 page. It is 2.2 mB large. I've tried different ways of Optimizer but it always removes the input field functionality.
    How can I decrease file size while maintaining the integrity of the form? Thank you so much in advance. PDF attached.
    Dina

    Generally, the only thing that I remove after creating a pdf file with forms that doesn't effect the fields is to remove embedded fonts. It would be best to to all of the other optimizations before creating the form fields.
    That's nice you say, but I've got the form fields already. Try reducing the size (as you have already done), then replace the page in the file with the form fields with the one whose size you have reduced. The form fields should stay. I don't know what happens to the size of the new file, let us know?

  • Compare editable alv output with database fields

    I generated 1 editable alv report with attaching flat file data,
    but i want to change the wrong fields in alv output and compare with database filds for validation.
    but when i do this . it takes previous entries of flat file.
    how can i solve it?

    Your title is much better than in the first post, however your problem description hasn't changed.
    Let me guess, you are importing a flat file, present the contents in an editable ALV grid, some values are being changed, and now the changed values do not reflect in the internal table, instead you are seeing the values as imported from the file?
    If yes -> FAQ, please search for the many previous discussions of this topic.
    Thomas

  • PDF Generation with LiveCycle Data Services

    Hi everybody!
    I am using LiveCycle Data Services to generate a dynamic pdf. I worked with this tutorial : livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/pdfgen_1.html and i adapted the code to my own example.
    I created a pdf template with livecycle designer and i succeed to generate the pdf thanks to LiveCycle Data Services.
    Here is my problem :
    In LiveCycle Designer i create a table and bind my data connection (from xml source) to this table and i bind subforms to repeating data.
    It works when i try to open an overview of the pdf with LiveCycleDesigner.
    But when i try to generate the pdf with livecycle data service, there is no repeat of my data. There is only a number of items corresponding to the minimum of repeating i set in livecycle designer binding window...
    Is it possible to generate repeating data with LiveCycle DS ?
    an example of my xml source :
    <item id="1">
         <data>blabla</data>
    </item>
    <item id="2">
         <data>blabla</data>
    </item>
    In livecycle designer, if i set the minimum of repeating to 1,  LiveCycle DS generate a pdf with only one item.
    if i set the minimum of repeating to 2,  LiveCycle DS generate a pdf with only 2 items. etc.
    I don't know how to generate an indeterminate number of items...
    Thanks in advance for your help.
    Bye
    Guillaume

    Hi Guillaume,
    there is no limitation. Dynamic PDF files can be generated with Livecycle Data Services.
    You should have a look at the XML file generated by your Flex code. Try to save it and see how the XML file behaves when you generate a PDF preview with Designer. You can go to the menu:  File >  Properties > Preview > Use XML test data...
    With the XFAHelper class, you can either load a PDF or a XDP file. Have you tried with a XDP ?
    I've attached a dynamic PDF file that I've created for a customer. I generate a dynamic PDF file using LiveCycle Data Services. Maybe you'll find some clues within the file.
    Michael

  • Generate PDF FORM with editable fields

    Hi,
    my requirement is to create a document wich has a number of fields which users can fill in. By default, these fields need to be filled in with the data from the database, but editable by the user, the rest of the document has to be non-editable. I'm looking to PDF Forms for this, but am open to other suggestions. I can't get the output to show such fields. Is it even possible?
    Spiffo

    HI,
    I have no clear at all how we define a editable field in the template.
    Besides, we need Adobe Writer to see this editable fields from the PDF generated?
    Thanks in advance.
    S.

  • Bug in PDF generation with Report Builder CF8

    Hello
    there is a bug in the calculation of the left margin of a
    page.
    I upgraded from MX 7.02 to CF8. My "old" Reports worked fine,
    but when I export them to PDF an print them the left margin is
    different.
    I'm using metric settings in the Report Builder. I created a
    new Report with Left Margin 2 cm and a single Field with the left
    Property = 1 cm (0.9879 cm). The printed paper with these poperties
    where fine. I could measure appoximatly 3cm . But if I use Report
    Left Margin = 1.27 cm and Field left Property = 0.35cm. The left
    margin of the printed paper is only 1.1cm.
    So it depends on the choosen Values of report left margin and
    the left property of a field.
    Does anybody else have the same problem?

    I found this posting as I have now "rediscovered" this issue. I came to the same conclusion - edit ALT TEXT for every image.
    However, I think it is confusing that these paths of image file are not considered Personal Information that can be removed using the Inspect Document feature (I tried - was not successful). The list of things to be removed using this wizard is quite extensive
    - and some of them less visible than these file paths.
    It would be interesting to know if this is going to change with future updates of Word. Why is an ALT TEXT included at all per default? I think using the file path in ALT TEXT should be made optional. Is there a way to turn off this default embedding of
    the full path?
    As the OP I also used Office 2013 on Windows 7 64bit.
    Elke

  • Automating PDF Generation with InDesign

    Is it possible for InDesign to retrieve info from a database, automatically format the data with paragraph style(s) and export hi-res PDF art for each database entry? PDF export to include common art positioned on the master page. If this function is possible with InDesign, how does one accomplish this task?... AppleScript? I don’t speak code, so this could be very intimidating. Recommendations?

    I think you might need an interpreter. I speak code, sure, but very slowly and with a very thick accent.
    Plain vanilla InDesign won't hit a database; there are plugins for that. Catalog plugins, for example; if you're making something catalog-like, that's worth a search or three. If you can get CSV files from your DB, then Data Merge will work for minor automation. Read up on InDesign's XML capabilities if you need something more robust than that; it is extremely useful, and even someone like myself with barely-there software development skills can automate the production of a dictionary with XML spat out of a database.
    In terms of automating the the formatting, XML is another obvious choice, because the working method is to map an XML tag to a style.
    Exporting PDFs automatically is something that can be achieved with scripting, either Apple- or Java-. I don't know off the top of my head how to set it up, but there are quite a few talented scripters reading these forums, and perhaps one of them can nudge you in the right direction. Perhaps you'll see the advantage in actually contracting one of them to develop this for you.
    All that being said, I'd be surprised if there wasn't already a catalog plugin to do exactly what you want. (The last time I said "InDesign can't really do that" it took about fifteen minutes for the forum regulars to post both a plugin and a custom-developed script that basically completely fulfilled the original poster's criteria.)

Maybe you are looking for

  • Why is iPad icalendar app off 1 day for all repeating events after feb 29?

    iPhone, computer, cloud all correct and time zone set.  Think there is a major issue in iPad I calendar code somewhere!!!!!! iPad

  • Adding a Tree into a datagrid column

    I have a requirement where I have to create a datagrid with one of the columns having a tree control. The problem I am trying to resolve is how to dynamically change the height of the datagrid column which has the tree when the tree is collapsed and

  • Recurring permissions errors after every reboot

    Apologies if this has been covered but I am wondering why Disk Utility/Macintosh HD/Repair Permissions is constantly reporting the following: Permissions differ on "Applications/Safari.app/Contents/Resources/Safari.help/Contents/Resources/inde x.html

  • Hierarchy in BW-BPS

    Hello, I have a hierarchy in BW (made of characteristics nodes) and i want to use that hierarchy in BW-BPS. But in BPS this hierarchy become one node hierarchy: <b><i>in BW</i></b>: <i>Total</i> .A ...1 ...2 ...3 .B ...2 .....22 ...3 ...4 .....41 <i>

  • I can't get my serial Number after downloading the trial version of DreamWeaver CS5.?

    Hi there, After downloading the trial version Of Adobe Dreamweaver CS5.5, I had to type in the serial number to actually use the product but I can't find the serial Number anywhere and now i don't  know what to do because it is a trial version and so