Frequently Asked Question:
How to add a header comprising of a logo and a passed text to each page of an existing PDF file?
A) how to add a header comprising of a logo ,a passed text, datetime stamp and page no, to each page of an existing pdf file as below.
STRV/16/189-IUR OPEN SET 12.05.2011 15:53 Page 1/20
The options I am looking for are :
- I can pass the whole header as a html script, or;
- I pass the logo-image url and the heading text; while quickpdf generates time stamp and page no
B) while combining multiple pdf files of varying number of pages, trust the system can generate page number in format '4/20 ' and show it at header or footer space?
Quick PDF is a toolkit that requires programming to perform these types of functions.
A very simple program would give you all of the this functionality and full control over what is added to your PDF file.
Here is some C# code showing how to stamp an existing PDF page with some text and a logo.
QP.UnlockKey("<put you key here>");// Unlock the library.
QP.LoadFromFile("file1.pdf");
int pageCount = QP.PageCount();
int imgId = QP.AddImageFromFile("logo1.jpg", 0);
for (int page=1;page<pageCount;page++)
{
QP.SelectPage(page);
string timeStamp = MyTimeStampFunction(section, page);
QP.DrawText(10, 10, "STRV/16/189-IUR OPEN SET 12.05.2011 15:53 Page 1/20");
QP.SelectImage(imgId);
QP.DrawImage(500, 100, 100, 100);// x, y, w, h
}
QP.SaveToFile("output1.pdf");
There are also lots of Quick PDF Library functions to merge PDF files, extract single pages etc that would be quite straight forward to program.