PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 5:19 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Sep 21, 2020 9:19 am 
Offline

Joined: Mon Sep 21, 2020 8:45 am
Posts: 3
Hi,

Below code is used to create a pdf file of 4 pages

var pdfXpsDoc = PdfSharp.Xps.XpsModel.XpsDocument.Open(lMemoryStream);
PdfSharp.Xps.XpsConverter.Convert(pdfXpsDoc, fileName, 0);

But it cause memory leak if call multiple times, say 100.

On analysis, it is found that the "table" member of type "Dictionary" in FontDescriptorStock class is holding the objects.

Could you please help?

Note: We are using 1.32 version. But, it does not contain PdfSharp.xps module. So, i copied the used the module from 1.31 version.


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 21, 2020 9:49 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
Font handling has been reworked for version 1.50. I don't know if the XPS code works with version 1.5x.

Unlikely that someone will investigate possible memory leaks of version 1.32 anymore.

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


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 21, 2020 12:05 pm 
Offline

Joined: Mon Sep 21, 2020 8:45 am
Posts: 3
Hi,

Thanks for the update.

Will I be able to save my xps document to pdf file using v1.50?

Also, v1.50 is mentioned as "beta" in sourceforge.net.

Thanks,
Vineeth


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 23, 2020 10:29 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
1.50 is stable on GitHub, 1.51 is beta.

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


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 24, 2020 10:01 am 
Offline

Joined: Mon Sep 21, 2020 8:45 am
Posts: 3
Will it be able to work below code with 1.50 version?

var pdfXpsDoc = PdfSharp.Xps.XpsModel.XpsDocument.Open(lMemoryStream);
PdfSharp.Xps.XpsConverter.Convert(pdfXpsDoc, fileName, 0);

OR
Do you have any recommendation to achieve my task using latest 1.50 version?


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 52 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