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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Page cloning
  FAQ FAQ  Forum Search   Register Register  Login Login

Page cloning

 Post Reply Post Reply
Author
Message
Boris View Drop Down
Team Player
Team Player
Avatar

Joined: 15 Feb 07
Location: Belgrade Serbia
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boris Quote  Post ReplyReply Direct Link To This Post Topic: Page cloning
    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...
Back to Top
ixm7 View Drop Down
Senior Member
Senior Member


Joined: 13 Jan 06
Status: Offline
Points: 68
Post Options Post Options   Thanks (0) Thanks(0)   Quote ixm7 Quote  Post ReplyReply Direct Link To This Post Posted: 06 Apr 07 at 5:46PM
Please provide more detail about what you intend to do with the final document.
Back to Top
Boris View Drop Down
Team Player
Team Player
Avatar

Joined: 15 Feb 07
Location: Belgrade Serbia
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boris Quote  Post ReplyReply Direct Link To This Post Posted: 06 Apr 07 at 9:07PM
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...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store