PDFsharp & MigraDoc Forum

PDFsharp - A .NET library for processing PDF & MigraDoc - Creating documents on the fly
It is currently Tue Sep 30, 2025 12:06 pm

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  [ 4 posts ] 
Author Message
PostPosted: Fri Dec 07, 2012 9:52 am 
Offline

Joined: Mon Nov 01, 2010 2:23 pm
Posts: 17
Location: Prague, Czech Republic
I have a problem displaying PNG images in a table. They don't seem to work if there is any text before the table with the image. I have created two minimal samples. In each of them there is a table with just a single row and column and the only cell in it contains a PNG image. If I put a text before the table, no image is drawn in the PDF output. If I put it after the table, the image is drawn correctly.

Actually I found out the only difference which makes it work is at the beginning of the generated PDF files (I was not able to add PDF attachments to the post). In the "correct" file there is a block
Code:
    /ExtGState
    <<
      /GS0 6 0 R
      /GS1 10 0 R
    >>


In the "incorrect" file there is instead
Code:
    /ExtGState
    <<
      /GS0 6 0 R
      /GS1 11 0 R
      /GS2 12 0 R
    >>


If I replace it with the "correct" block, the image appears in the PDF (no other changes are necessary). So it seems to be a problem with some graphic state. But I am no expert in PDF format, so the true cause might be something else.

EDIT: Attached a zip file with the sample PDF files.


Attachments:
File comment: Both PDF files showing the issue.
Documents.zip [30.96 KiB]
Downloaded 701 times


Last edited by crypto_rsa on Mon Dec 10, 2012 10:21 am, edited 1 time in total.
Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 10, 2012 10:08 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3136
Location: Cologne, Germany
crypto_rsa wrote:
I was not able to add PDF attachments to the post
You can add ZIP files to your post (if they are small enough).
Larger files can be submitted via e-mail.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 10, 2012 10:22 am 
Offline

Joined: Mon Nov 01, 2010 2:23 pm
Posts: 17
Location: Prague, Czech Republic
Thomas Hoevel wrote:
crypto_rsa wrote:
I was not able to add PDF attachments to the post
You can add ZIP files to your post (if they are small enough).
Larger files can be submitted via e-mail.

They are now attached to the original post.


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 17, 2012 8:07 am 
Offline

Joined: Mon Nov 01, 2010 2:23 pm
Posts: 17
Location: Prague, Czech Republic
Any ideas how to fix this, or workarounds?


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: Google Adsense [Bot] and 360 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