Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys,

I need to create PDF document using C# , but the problem is that I have a large block of text which has to be located at the top of every page (I have 12 pages).

Should I add this block manually at every page? Maybe it can be made once automatically?

What I have tried:

I googled several libraries for PDF, but couldn't find the one with such magic. I tried ExpertPDF, IText and bunch of other libraries that just convert HTML to PDf, but I need to generate my documents from scratch.
Posted
Updated 28-Jul-21 2:57am
Comments
[no name] 31-Mar-21 13:23pm    
There's no "problem"; you just don't seem to want to try the obvious.
[no name] 1-Apr-21 16:12pm    
???

1 solution

You need to spend time with those libraries to know more about its features. Here some Open source libraries
Open Source PDF Libraries in C#[^]

Regarding your question ... Basically you need to use Header. Report Document has Header & Footer which is basically for repeated contents like Logo, Title, Page Number, Date-Time, etc., So you have to add your text in Header section. I'm sure most libraries have this option because Header & Footer are important parts of Reports.

I found below articles
Generating Dynamic PDF Documents using the Open Source Scryber Library[^]
PDF File Writer C# Class Library (Version 1.28.0)[^]

Search Codeproject & Web for more articles.
 
Share this answer
 
Comments
[no name] 1-Apr-21 16:18pm    
Thanks for your reply and for the links that you provided! I will definitely check them out.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900