PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 5:15 pm

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: Thu Jul 25, 2013 12:41 pm 
Offline

Joined: Wed Apr 24, 2013 1:46 pm
Posts: 8
Hello,

I'm using the GDI+ version of MigraDoc.
After I show the pdf in the DocumentPreview Elemnt, I need to save that document. The Document includes a image (*.bmp) which is shown very well.
But the saved pdf File says "Image could not be read".
For that I use the code from the sample.
Code:
PdfDocumentRenderer pdfRender = new PdfDocumentRenderer();
pdfRender.DocumentRenderer = Preview_DP.Renderer;
pdfRender.Document = Preview_DP.Document;
pdfRender.RenderDocument();
Preview_DP.Document.BindToRenderer(null);

if (!Directory.Exists(Path.GetDirectoryName(Folder_TXT.Text)))
    Directory.CreateDirectory(Path.GetDirectoryName(Folder_TXT.Text));

pdfRender.Save(Folder_TXT.Text);

What can I do to read that picture?

Thank you
olum


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 29, 2013 6:52 am 
Offline

Joined: Wed Apr 24, 2013 1:46 pm
Posts: 8
Hello again,

I tried to investigate that problem.
On my Win7 Development PC it works very well.
But on WinXP PC's it always shows that problem.

I think the DocumentPreview element locks the Bitmap file. Because if I change the Bitmap with an editor also the preview changes immediately.
How can I preview the document without locking the Bitmap file?

I hope someone can help me.
olum


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 392 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