• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Generate PDF from a Web App

Engaged ,
Feb 15, 2017 Feb 15, 2017

Copy link to clipboard

Copied

Preface: I searched the Google and Adobe forums first, honest.

Background: I made the world's coolest dynamic Acrobat JS app/pdf thing for this guy to create and complete dynamic reports using templates and such.

Problem: Now I'm working on a web app (html, javascript, php, MySQL -- so far ... I'm willing to learn whatever I need to ... I'm also learning Python) so he and his employees can contribute anywhere/anytime from a desktop browser, phone, or tablet and then compile it into a report. Short-term, I'll create something so they can download some XML or other form data to import into the report -- a supplement to the existing PDF thing I've created. Long-term, I want all the building to be browser-based so they can just export a pretty PDF at the end.

Question(s):

  • I'd rather create my own, but is there an existing server-side app that does this? I thought for sure there were, but now I can't find them. My host/server is Linux.
  • Ugh, am I going to need a more expensive dedicated server?
  • Is Distiller the answer? I know Distiller can be on a common server but a web server for a web app?
  • For creating my own, is the Acrobat SDK documentation the place to continue reading? Or is that for just working in Acrobat itself?
TOPICS
Acrobat SDK and JavaScript

Views

5.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Feb 16, 2017 Feb 16, 2017

jays55219621  wrote

I don't want to just print a web page to a PDF because that's ugly. I've seen web sites that generate beautiful PDF documents.

Well, one thing you can do is open up one of those beautiful PDF documents in Acrobat and look at its Document Properties (File -> Properties, or right-click and select "Document Properties").  On the Description tab, it should tell you the Application used to make the PDF (such as Adobe InDesign), and the Producer software used by that app (such as th

...

Votes

Translate

Translate
LEGEND ,
Feb 15, 2017 Feb 15, 2017

Copy link to clipboard

Copied

On thing that's absolutely certain is that the Acrobat SDK isn't what you need. Reason: the Acrobat SDK automated Acrobat (not standalone) and Acrobat not for server use. Ditto no server side Acrobat JavaScript.

You might need a dedicated server; it depends what your hosting service allow you to install, and what you choose for your solution. gisting services are very variable.

Can you give a bit more info on your proposed application. For instance, is it basically filling form fields, or it generation from a dynamic template?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 15, 2017 Feb 15, 2017

Copy link to clipboard

Copied

At present, it's a PDF with a dashboard that spawns forms based on templates in the PDF as needed. The web app would be html forms. The user is a private investigator. Through the course of an investigation (a "case"), he adds and completes various forms as needed. There's a main form in the dashboard to enter names and locations that will be used in multiple forms (they get added to drop down menus). So, the web app will have these forms available -- user will log in, create a case (the case number gets stored in the database), and, whenever user completes a form (a new form for each "investigative action" such as surveillance, digging through trash, social media research, etc.) it will be attached to a case number. When the investigation is complete, the user will generate a report that combines all of these and ... I'd like it to be a well-formatted, pretty PDF.

I don't want to just print a web page to a PDF because that's ugly. I've seen web sites that generate beautiful PDF documents.

I could make it so the user just downloads the form data and imports it into the current (but enhanced version of) PDF but I'd love to save them that step. Also, for "actions" that take up more room than the text field on a page, they have to manually add another page ... I don't know how to handle the overflow in the current PDF, let alone if it is all generated dynamically via web app.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 16, 2017 Feb 16, 2017

Copy link to clipboard

Copied

jays55219621  wrote

I don't want to just print a web page to a PDF because that's ugly. I've seen web sites that generate beautiful PDF documents.

Well, one thing you can do is open up one of those beautiful PDF documents in Acrobat and look at its Document Properties (File -> Properties, or right-click and select "Document Properties").  On the Description tab, it should tell you the Application used to make the PDF (such as Adobe InDesign), and the Producer software used by that app (such as the Adobe PDF Library).  You could then Google for those companies and products.

It sounds to me like you want some kind of web-to-print (W2P) application, or a variable data printing (VDP) product.  (You may even want to look into a full-fledged marketing automation system which is already designed around reporting and collaboration.)  Like TSN said, there is a wide range of such products, with varying capabilities and price points.  I will humbly suggest that you could check out my company's VDP solution, called FusionPro.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 01, 2018 Mar 01, 2018

Copy link to clipboard

Copied

Just using the phrase "variable data printing" gave me something to feed Google and ... viola! I found tons of leads ... thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 16, 2017 Feb 16, 2017

Copy link to clipboard

Copied

I think I'll go to the highest level overview of the task. There are many ways to make a PDF.

1. Read the PDF specification (1000 pages+) and generate the PDF directly. Not cost effective or recommended, but a fascinating project.

2. Use a library for PDF generation by low level calls. For example, "Place 'Date:' at coordinates 72,503 in font Helvetica at size 12 points". PDF has no concept of text reflow, so you need the exact position of everything, and to do all line break calculations yourself.

3. Use a library with some higher level of abstraction. Perhaps a library exists that does text flow to fill a page, combined with other APIs for lines etc.

4. Use a converter tool from some other format. Converters exist for many formats such as DOC, HTML, TXT, JPEG, ... Often tools rely on other apps and use method 5 internally (e.g. DOC converters tend to use Word). In the server world, Adobe's "LiveCycle PDF Generator" offers some formats. The format XSL:FO is of note: it is XML page descriptions, and was really designed to be converted to other formats for real use: PDF is a major use. If you have XML skills this is worth looking at. No Adobe tool.

5. Print to PDF. This is a Windows thing mainly, using the print/graphics architecture to render to screen. If you have an app and can persuade it to print to a specific printer, and you have a PDF printer, you can make PDF. In the server world you might be able to print to a PostScript printer driver, then use Adobe's "LiveCycle PDF Generator, PostScript Edition".

6. Have an existing PDF and fill form fields. Software exists to do this, but display of form fields is limited in different viewers. Ideally the software will "flatten" to a regular PDF.

7. Deliver form field data and have the viewer fill it in. Now there are multiple viewers in use, this is dead as a portable idea.

8. Use Acrobat JavaScript to dynamically create pages, text and/or form fields. Since this cannot be used on a server, and multiple real world clients are in use, this is probably a non starter.

9. Use software to stamp text onto the pages of an existing PDF based on some scheme; or otherwise edit. This is not much different to methods 2-3 except with an existing PDF to inherit as the starting point.

There are probably more models. But you might like to think about which of these appeal, and which are out of the question. Lots of software is available, of varying quality, and varying price (from free to hundreds of thousands of dollars).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 15, 2018 Jun 15, 2018

Copy link to clipboard

Copied

One thing you may want to look at is CSS @media queries.. Or more specifically, @media print. If your forms are HTML based, you can define specific CSS styling rules that only apply when the computer fires a print event trigger. You can also set further rules that aren't CSS related, like adding /removing class names from elements that effectively change their visual style, via javascript/jquery. You can revert the display view for the user from the CSS print layout, or just redirect to a success page, when the print action completes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2018 Jul 02, 2018

Copy link to clipboard

Copied

I will have your spam removed if possible. This is not a place to promote your products.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 05, 2018 Jul 05, 2018

Copy link to clipboard

Copied

What product is it you think I'm promoting? Unless it's me. I guess if I am a brand, as they say, I am most certainly a product. And, most certainly, I am pretty darn awesome. Oops, there I go promoting myself!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 05, 2018 Jul 05, 2018

Copy link to clipboard

Copied

Hmm, that will teach me to comment on spam. It was indeed removed (thank you moderators!), leaving just my confusing reply. Some misguided soul is registering a succession of new accounts, and replying to posts, some years old, to promote their PDF library. There are many third party libraries, some of them very good, but Adobe don’t provide their forums for cynical advertising... and I think the succession of new accounts shows someone trying to game the system.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 06, 2018 Jul 06, 2018

Copy link to clipboard

Copied

LATEST

Well, at least we know YOU aren't shady, Test Screen Name! You have a face even the most cynical person would trust.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines