PDFsharp & MigraDoc Foundation

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

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Dec 09, 2015 11:01 am 
Offline

Joined: Fri Mar 20, 2015 1:00 pm
Posts: 13
With prior versions there has been no problem to open a created PDF with another tool while the program which created it is still running. Now with beta 3 you either have to wait for the program to exit or kill the process.

You can test this by using the following code eg. in a Console application:
Code:
using (var doc = new PdfDocument())
{
    var page = doc.AddPage();
    XGraphics gfx = XGraphics.FromPdfPage(page);
    XFont font = new XFont("Verdana", 20, XFontStyle.Bold);
    gfx.DrawString("Hello, World!", font, XBrushes.Black, new XRect(0, 0, page.Width, page.Height), XStringFormats.Center);

    page.Close();
    doc.Save(@"C:\Temp\test.pdf");
}

Console.ReadKey();


Put a breakpoint on ReadKey and try to open the created PDF using your PDF reader. With beta 3 it will tell you the file is locked.


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 09, 2015 11:57 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
AFAIK we found and fixed this bug.
I think there will be a beta 3a or beta 4 soon.

I'm sorry for the inconvenience (even though it wasn't my bug :wink: ) and thank you for your feedback.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 09, 2015 1:44 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
Fixed with beta 3a released today.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Dec 10, 2015 6:32 am 
Offline

Joined: Fri Mar 20, 2015 1:00 pm
Posts: 13
Thomas Hoevel wrote:
Fixed with beta 3a released today.
Yup, now it's working again, thank you!

Thomas Hoevel wrote:
I'm sorry for the inconvenience (even though it wasn't my bug :wink: ) and thank you for your feedback.
As long as there's someone to blaim! :lol:


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

All times are UTC


Who is online

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