PDF Exporter Implementation Options

This article provides a technical summary of several possible approaches for implementing the DesignMerge Catalog PDF Exporter module in a catalog workflow. For more details about the PDF Exporter module, please visit the PDF Exporter Product Page on the Meadows web site.

TYPICAL IMPLEMENTATION

Search Key in URL

In a typical implementation of PDF Exporter, the end user constructs the final hyperlink URL by using the Search Key assigned to the DesignMerge Catalog placeholder as a part of the full hyperlink URL. As an example:

http://www.company.com/<SEARCH_KEY>.html

In the above example URL, during the PDF Exporter output process, for each designated placeholder in the document, the full URL specified above will be exported, substituting the value <SEARCH_KEY> with the actual Search Key value assigned to the DesignMerge Catalog placeholder. For example, if the product Part Number (Search Key) were "ABC123", then the resulting hyperlinked URL would become:

http://www.company.com/ABC123.html

Note that in the URL above, the PDF Exporter replaceable parameter <SEARCH_KEY> has been swapped by DesignMerge Catalog with the Part Number assigned to that placeholder in the document, in this example ABC123. The completed URL references a specific HTML page on the company web site that is expected to hold the details for the specified Part Number. This is the most straightforward way of using PDF Exporter, but it may not be applicable for all implementations.

OPTIONAL IMPLEMENTATIONS

For some customers, the hyperlinked URL cannot be constructed in the simple fashion described above. Perhaps the URL may contain other criteria unique to the Search Key, or the URL may be generated automatically by a different system. In these cases, there are a number of other implementation options that the user may wish to consider.

Place Full URL in a Separate Data Field

With this option, if the user (or IT department) knows in advance the complete URL that they wish to link to for each product SKU, then they can include that in a separate data field. To utilize this approach, the user will take advantage of the PDF Exporter <$link_name> replaceable parameter. This replaceable parameter instructs DesignMerge Catalog to extract the URL from the Variable Link name that has been specified by the parameter, and to use that URL to create the hyperlink in the PDF file.

For example, assume that you have the following data file layout:

SKU Price Product URL
ABC123 $1.99 www.company.com?a=ABC&n=123&category=cables
DEF456 $12.95 www.company.com?a=DEF&n=456&category=transistors
AZ999 $8.95 www.company?a=AZ&n=999&category=fuses

The SKU and Price fields are standard, but the third field of this data file contains the URL that a user would enter into their browser in order to obtain information about the product referenced by the SKU.

In this example, the DesignMerge Catalog user would enter the following URL into their Variable Link setup for PDF Exporter:

http://<$Product URL>

In the above example, <$Product URL> is an embedded link that references the data in a specific Variable Link. DesignMerge Catalog will pull the data for the URL from the Product URL Variable Link during the PDF creation process. In this fashion, every placeholder in the document can have a different and completely unique hyperlinked URL, provided that the user can include the full URL as a separate data field. In the example above, the final URL's for all products listed in the sample data file would be:

http://www.company.com?a=ABC&n=123&category=cables
http://www.company.com?a=DEF&n=456&category=transistors
http://www.company?a=AZ&n=999&category=fuses

In each case, the Product URL field of the data file was extracted and used to construct the final hyperlink in the exported PDF file. This approach is ideal if the customers IT department can include the full URL to a product in the same data file as their pricing information, however, providing this in a completely separate data file will work just as well.

Server-Side Script with Search Key Parameters

In this scenario, the initial URL is constructed such that it is directed to a server-side script, passing the Search Key in as a parameter. The server-side script processes the incoming URL and extracts the Search Key value. Using the Search Key, the script constructs a new URL that points to the product information associated with the specified Search Key. This can be accomplished via a simple lookup table, database query, or any number of methods. Once the full URL has been created, the script then re-directs the user to the newly constructed URL, which can exist on the same web site, or on any other web site.

For example, please take a look at the following URL:

http://www.company.com/lookup.php?KEY="<SEARCH_KEY>"

In this URL, assuming that the Search Key assigned to the placeholder is ABC123, then the full URL would become:

http://www.company.com/lookup.php?KEY="ABC123"

In the above example, the KEY parameter that is passed to the script as a part of the URL would be processed by the PHP server-side script called lookup.php. Inside of the lookup.php script, a database lookup might be performed, using the value for the KEY parameter in order to obtain the actual URL for the requested Search Key. Once the URL is obtained, the script would automatically re-direct the end user to the correct page on the same web site, or on a different web site.

Although this specific example references PHP scripting, practically any server-side technology can be used to implement this identical approach.

Simple Web Site Re-Direct Page

In this scenario, the end user sets up a separate web site or special URL that will receive the initial hyperlink that was embedded in the PDF files. Then, a process on that web site will examine the incoming URL, and re-direct it to the correct page on a separate web site.

This example is practically identical to the Typical Implementation described earlier. The only difference is that the HTML file referenced by the URL would contain a re-direct to a different web page. Redirects are fairly trivial to set up in this fashion, however, if the catalog contains a large number of products this may not be practical. In such case, a separate web site or a server-side process (as described in the previous section) would be a better choice.

Give Us a Call

Since there are so many ways to accomplish basically the same thing with respect to PDF Exporter implementations, please feel free to contact us directly. We can consult with you to determine the correct implementation approach to use, and in many cases can even custom modify the software to accommodate special situations.