<p><strong>Background</strong>:</p>

<p>I have a VB6 application I've "inherited" that generates a PDF for the user to review using unsupported Acrobat Reader OCX integration.  The program generates an FDF file with the data, then renders the merged result when the FDF is merged with a PDF.  It only works correctly with Acrobat Reader 4 :-(.  Installing a newer version of Acrobat Reader breaks this application, making the users very unhappy.</p>

<p>I want to re-architect this app so that it will send the data to be merged to a PDF output generation server.  This server will merge the data passed to it onto the form, generate a PDF image of this, and store it, so that any user wishing to view the final result can then simply get the PDF (it is generated just once).  If the underlying data is changed, the PDF will be deleted and regenerated next time it is requested.  The client program can then have any version of Acrobat Reader they wish, as it will be used exclusively for displaying PDF files (as it was intended).  The server will most likely be written in .NET (C#) with Visual Studio 2005, probably as a Web Service... </p>

<p><strong>Question</strong>:</p>

<p>How would others recommend I go about this?  Should I use Adobe's Acrobat 9 at the server to do this, puting the data into FDF or Adobe's XML format, and letting Acrobat do the merge?  Are there great competitors in the "merge data onto form and output a PDF" space?  How do others do this?  It has to be API based, no GUI at the server, of course...</p>

<p>While some output is generated via FDF/PDF, another part of the application actually sends lines, graphics, and text to the printer (or a form for preview purposes) one page at a time, giving the proper x/y coordinates, font, size, etc. for each, knowing when it is at the end of a page, etc.  This code is currently in the program that displays this for the user to review, and it is also in the program that prints the final form to the printer.  For consistency between reviewer and printer, I'd like to move this output generation logic to a server as well, either using a good PDF generation API tool or use the code as is and generate a PDF with a PDF printer... and saving this PDF for display by the clients.</p>

<p>Googling "Form software" or "fill form software" or similar searches returns sooooooooo much unrelated material, mostly related to UI for users to fill in forms, I just don't know how to properly narrow down my search.  This site seems the perfect place to ask such a question, as other programmers must also need to generate similar outputs, and have tried out some great tools.</p>

<p><strong>EDIT:</strong> </p>

<p>I've added PDF tag as well as PDF-generation. 
Also, my current customer insists on PDF output, but I appreciate the alternative suggestions.</p>

[{'answer_id': 54834, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>Take my advice.  Ditch PDF for XPS.  I am working on two apps, both server based.  One displays image-based documents as PDFs in a browser.  The second uses FixedPage templates to construct XPS documents bound to data sources.  </p>\n\n<p>My conclusion after working on both projects is that PDFs suck; XPS documents less so.  You have to pay cash money for a decent PDF library, whereas XPS comes with the framework.  PDF document generation is a memory hog, has lots of potholes and isn't very server friendly.  XPS docs have a much smaller footprint and less chances of shooting yourself in the foot.  </p>\n"}, {'answer_id': 54846, 'author': 'DaveK', 'author_id': 4244, 'author_profile': 'https://Stackoverflow.com/users/4244', 'pm_score': 0, 'selected': False, 'text': '<p>I have had great success using Microsoft Word. The form is designed in Word and composited with XML data. The document is run through a PDF converter (Neevia in this case, but there are better) to generate the PDF.</p>\n\n<p>All of this is done in C#.</p>\n'}, {'answer_id': 55802, 'author': 'Tony BenBrahim', 'author_id': 80075, 'author_profile': 'https://Stackoverflow.com/users/80075', 'pm_score': 2, 'selected': True, 'text': '<p>can\'t help with VB6 solution, can help with .net or java solution on the server.<br>\nGet iText or iTextSharp from <a href="http://www.lowagie.com/iText/" rel="nofollow noreferrer">http://www.lowagie.com/iText/</a>.<br>\nIt has a PdfStamper class that can merge a  PDF and FDF  FDFReader/FDFWriter classes to generate FDF files, get field names out of PDF files, etc... </p>\n'}, {'answer_id': 69603, 'author': 'Jeremy', 'author_id': 8557, 'author_profile': 'https://Stackoverflow.com/users/8557', 'pm_score': 0, 'selected': False, 'text': "<p>Same boat. We're currently making pdfs this way: vb6 app drops a record into sql (with filename, create date, user, and final destination) and the xls (or doc) gets moved into a  server directory (share) and the server has a vb.net service that has a filewatcher monitoring that directory. The file shows up, the service kicks off excel (word) to pdf the file via adobe, looks to sql to figure out what to do with the PDF when it is made, and logs the finish time. </p>\n\n<p>This was the cheap solution- it only took about a day to do the code and another day to debug both ends and roll the build out.</p>\n\n<p><strong>This is not the way to do it.</strong> Adobe crashes at random times when trying to make the pdfs. it will run for two weeks with no issues at all, and then (like today) it will crash every 5 minutes. or every other hour. or at 11:07, 2:43, 3:05, and 6:11. </p>\n\n<p>We're going to convert the stuff out of excel and word and drop the data directly into pdfs using PDFTron in the next revision. Yes, PDFTron costs money, (we bought the 1-kilobuck-per-processor license) but it will do the job, and nicely. XPS are <em>nice</em> but I, like you, have to provide PDFs. It is the way of things.</p>\n\n<p>Check out pdfTron (google it) and see if it will do what you want. Then you just got to figure out which license you need and how you gonna pay for it. If someone comes up with something better, hope they'll vote it to the top of the list!!!</p>\n"}]
['https://Stackoverflow.com/questions/54808', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5495/']