Solved

Generate Multiple PDF pages with iText

Posted on 2013-01-09
3
683 Views
Last Modified: 2013-01-21
Experts:

I have attached a PDF...  It was generated through vb.net using iText.  I need additional help on two items to continue my project.  

1.  How to take my completed PDF, and "flatten" the fields so no changes can be made.
2.  Complete this Master form, and fill in the additional "BOXES" on the form...  I CAN do this with iText using the PdfStamper object through the AddAnnotation...  The hard part for me is to add pages (Master Form as the base for subsequent pages) AND then fill in details on each added page (hope this is clear).

I have purchased the iText in action book by Bruno Lowagie, and have found some references to "addpage"; however, my attempts are falling short...  I can add a page, but it is just a blank page.... not sure how to add a page with the added page being the Master.pdf.... And not sure how to add fields on the newly added page...???

Hopefully someone can point me in the right direction....  

Thanks in advance
Rick Norris
Master.pdf
0
Comment
Question by:Rick Norris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 17

Expert Comment

by:Dushan De Silva
ID: 38773167
1. Use noEdit function to stop editable fields and pages.
// Can't edit the fields of the form to prevent further changes to the data

function noEdit(  )
{
//	console.println("noEdit!<wbr ></wbr><wbr ></wbr><wbr ></wbr>!");
	
	for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) 
	{
		// Get the field containers from each page
		var oFields = xfa.layout.pageContent(nPa<wbr ></wbr><wbr ></wbr><wbr ></wbr>geCount, "field");
		var nNodesLength = oFields.length;
		for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) 
		{
			if (oFields.item(nNodeCount)!<wbr ></wbr><wbr ></wbr><wbr ></wbr>=this) 
			{
				oFields.item(nNodeCount).a<wbr ></wbr><wbr ></wbr><wbr ></wbr>ccess = "protected";
			}
		}
	}
	
//	console.println("form can not edit!");
}
            

Open in new window

0
 

Accepted Solution

by:
Rick Norris earned 0 total points
ID: 38782361
I was wanting more than just how to make fields "not editiable"... and have not tried to test the code given by Dushan911.

I am closing this question now....  I determined that I needed more personal attention, and contacted another member directly....  

I will not be posting the solution, because it is very extensive, and this is one that I PAID FOR the other members expertise....  It was worth every dollar that I spent, and more!!

Rick Norris
0
 

Author Closing Comment

by:Rick Norris
ID: 38800466
I contacted another member for a paid solution
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
GUID's in SQL Server 4 31
How to call new form in VB2013? 4 36
EMAIL RANGES BASED ON CURRENT TIME 12 41
Help with modifying xml file using VB.NET 5 8
Have you ever come up with a need of emailing only few pages of PDF file to one of yourfriend or colleague, instead of whole Adobe file? If yes, then surely you have face problems in doing that! Read this section as I have suggested multiple solutio…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this first video of the three-part Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question