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!
Create new pages and stamp text on each using C# |
Post Reply |
Author | |
Rowan
Moderator Group Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
Posted: 09 Sep 09 at 2:59AM |
This C# sample code shows you how to programmatically create new pages and stamp text on each of the pages as they are created. In the for loop you could use any of the drawing, table, form field, etc, function to create dynamic PDFs on the fly. It's quick and easy. --- private void btnNewPages_Click(object sender, EventArgs e) { string LicenseKey = "...INSERT_LICENSE_KEY_HERE"; int result; int page; int totalPages; QuickPDFAX0715.PDFLibrary qp = new QuickPDFAX0715.PDFLibrary(); result = qp.UnlockKey(LicenseKey); if (result == 1) { qp.NewPages(24); totalPages = qp.PageCount(); for (page = 1; page <= totalPages; page++) { qp.SelectPage(page); qp.DrawText(100, 500, "Page " + page); } qp.SaveToFile("NewPages.pdf"); } else { MessageBox.Show("Sorry, but the license key you provided could not be validated."); } }
|
|
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