PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Oct 12, 2024 11:53 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Aug 30, 2024 10:09 pm 
Offline

Joined: Fri Aug 30, 2024 9:47 pm
Posts: 1
I tried pagination for my pdfsharp pdfdocument Page x of Y, after disposing the XGraphics gfx variable
Which is used for writing..
I written foreach loop,and assigned new XGraphics but I am getting error like gfx is already existing.
"An XGraphics object already exists for this page and must be disposed before a new one can be created "
Kindly help


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 05, 2024 8:38 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 995
Location: CCAA
Most likely you did not dispose the XGraphics object you used to create the page.
Now you get that error message when trying to create a second XGraphics object to add pagination.

_________________
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 18 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:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group