PDFsharp & MigraDoc Forum

PDFsharp - A .NET library for processing PDF & MigraDoc - Creating documents on the fly
It is currently Fri Oct 03, 2025 5:44 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules

Also see our new Tailored Support & Services site.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Aug 06, 2015 7:30 pm 
Offline

Joined: Thu Aug 06, 2015 7:15 pm
Posts: 1
Hi All,

I am a newbie to the PDFSharp. I am using PDFSharp in my project to implement the following scenario:

My project is a web portal which talks with the SSRS reporting server to produce individual ssrs reports in pdf format. There is a master set of 20 reports on the ssrs server.
Any time a user can choose to produce any number of reports out of those 20 master reports.

After the reports are produced, I am using pdfsharp to merge them into one single pdf, which is then mailed to the end user.
Now user is requesting if he can see page numbers in the final pdf.

I searched through the forum and saw some posts with something "gfx". I am not familiar with the pdf structure. Is there any straight forward way using PDFDocument object or do I have to write custom code for this?

Thanks,
Sumit


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 08, 2015 6:57 pm 
Offline
PDFsharp Guru
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 1057
Location: CCAA
Hi!

There are several samples:
http://pdfsharp.net/wiki/PDFsharpSamples.ashx

The Hello World sample shows how to draw text.

It should be rather simple to modify your code with a page counter and then add the page number to each page.
The Watermark sample does it with big, transparent, and rotated text - instead just add normal text.

Either re-open the combined PDF or add the text while combining the PDF files - the latter should be faster, the former might be simpler to implement for a newbie.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 457 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group