Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Page cloning |
Post Reply |
Author | |
Boris
Team Player Joined: 15 Feb 07 Location: Belgrade Serbia Status: Offline Points: 22 |
Post Options
Thanks(0)
Posted: 05 Apr 07 at 5:50PM |
Hi,
The problem I am trying to solve all day today... I have a database with some number of employees. let's say 2 employees. I also have a "template" PDF which is used to enter some data about each employee, and these data I read from the database. What I do is first I load the "template". Then I count how many employees I have (in this example I have 2 employees only). Next, I CLONE the first page of the "template" PDF by number of employees, this way I practicaly finish with the document having 2 pages. All of them the same. Now I jump to the FIRST document page, and traverse through the database and write each employee data on the separate page. And this part is the problem. The first page contains the data only for the FIRST employee. But, the second page contains data fr FIRST employee and ALSO the data fro SECOND employe!!?? Seams to me that when we clone the pages for example we clone the FIRST page, whatever we later write ont the FIRST page is automaticaly written on this page CLONE ALSO!? I suppose this is why I got on the second page the data for the FIRST employee, and on top of this data the SECOND employee data are written also.... Basicaly what I need is: 1. Load the template 2. Clone the first page as many times as the number of employees in the database 3. Start writing data from the database, first employee data goes on the page 1, second employee data on page 2 etc... 4. Saving the document under the different name. Please, give me a hand about this issue, it prevents me from finishing the project and I feel it is something trivial which I am mislooking all the time... regards |
|
Better to write programs than not to write programs...
|
|
ixm7
Senior Member Joined: 13 Jan 06 Status: Offline Points: 68 |
Post Options
Thanks(0)
|
Please provide more detail about what you intend to do with the final document.
|
|
Boris
Team Player Joined: 15 Feb 07 Location: Belgrade Serbia Status: Offline Points: 22 |
Post Options
Thanks(0)
|
I solved this today, by using another aproach.
First I calculate the number of employees (which may vary of course). Then I merge the same "template.pdf" twice into a new document. I repeat merging until I finish with the desired number of pages. Then I traverse through the database and write each employee data on separate page. Works perfect. Regards |
|
Better to write programs than not to write programs...
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store