Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 24th, 2011, 09:36 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default write to existing .pdf template file

Good day

My objective is to populate an existing pdf document with information from a data base. I have never interacted with PDF docs before using classic ASP. I have read and can find a fair bit of info about creating PDF docs however looking for information on populating an existing template iseems to be a bit thin.

Any advice on this would be appreciated. To achieve this objective using pure ASP would be great. mmmmm whats my chances of that??

The specific objective is:

>user clicks print/save my information
>code finds the .pdf template file and makes a copy for writing
>gets recordset from DB
>populates the blank form fields on the file and presents the file for printing/saving.


TYIA
__________________
Wind is your friend
Matt
  Spam!  
Old February 25th, 2011, 05:27 AM
Authorized User
 
Join Date: Jan 2011
Posts: 86
Thanks: 1
Thanked 12 Times in 12 Posts
Default

Hi,

this isn't exactly a classic asp solution but you might want to look into iTextSharp for a c# solution..

I haven't used it to replace text in existing pdf's yet, but looking at the following blogpost it seems possible: http://www.johnnycode.com/blog/2010/...and-itextsharp
 
Old February 25th, 2011, 08:50 AM
Authorized User
 
Join Date: Jan 2011
Posts: 86
Thanks: 1
Thanked 12 Times in 12 Posts
Default iTextSharp

Hi,

if you don't need to stick to classic asp it can be done in c# and the open source iTextSharp library.

If you google on "Using a template to programmatically create PDFs with C# and iTextSharp" you'll find an example blog post on how to do that..
 
Old February 28th, 2011, 10:04 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

disel2010 - Thank you for your time however Classic ASP is required in this case

Others

http://www.asppdf.com/ seems to work very well, excellent documentation. So far I have only figured out how to write to an existing template using x and y coords for placement. mmmmm a bit weird I would have thought you should have been able to reference PDF form field names. Also the corrds seen to be from the bottom left position for each page, also a bit weird I thought. Anybody know why?
__________________
Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to append node to an existing file geek.shrek XSLT 4 January 10th, 2010 02:08 PM
Run PDF Reader and PDF file with Cmd Button RodM Access VBA 3 April 21st, 2009 12:43 PM
How to display .tif file, .pdf file and .jpg file phuong171 ASP.NET 1.0 and 1.1 Basics 1 March 13th, 2007 07:29 AM
creating new xml file from existing deepee XML 1 July 25th, 2006 10:35 AM
Export existing reports to pdf amywang Crystal Reports 1 October 19th, 2004 11:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.