PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Jul 16, 2024 4:41 am

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: Tue Dec 07, 2010 11:29 pm 
Offline
Supporter
User avatar

Joined: Thu May 27, 2010 7:40 pm
Posts: 59
Location: New Hampshire, USA
Hi,

I am seeing some table/cell border drawing behavior that is a bit puzzling.

So I created a small test table in MigraDoc with:
  • all CELL borders set to RED with 4px Top, 3px Right, 2px Bottom, 1px Left border thicknesses (set on each cell via Cell.Borders.Top/Left/Right/Bottom ).
  • and a 4px thick BLUE table outer border (set via the Table.SetEdge() specifying the entire range of cells inthe table)
When the table is rendered, the "inner" table borders look as I'd expect them to and the outer border looks perfect as well, except that the Inner border horizontal and vertical lines are drawn overlapping the "outer" borders on the left, right and bottom edges but are fine at the top edge. Is this a drawing order issue?
The result is:
Attachment:
Capture.JPG
Capture.JPG [ 29.15 KiB | Viewed 6898 times ]


Anyone have any ideas on how I can fix or control the rendering of this?

I don't completely understand the border merging/rendering process in Migradoc and any assistance would be greatly appreciated. :D

-Jeff


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 08, 2010 8:55 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
Hi, Jeff,

I presume you're creating a PDF file.

Do you use GDI+ or WPF build? (I dunno if it makes a difference.)

Why not set 2,2,2,2 borders?

With more information and some sample code (e. g. MigraDoc DDL and a PDF file) I can take a look at this issue.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 08, 2010 3:58 pm 
Offline
Supporter
User avatar

Joined: Thu May 27, 2010 7:40 pm
Posts: 59
Location: New Hampshire, USA
Hi Thomas,

I'm using GDI+ and so far things have worked pretty well.

My application migrates Lotus Notes database documents into Microsoft SharePoint. One of the target formats is PDF. My framework builds Migradoc document objects from the Lotus Notes document elements trying to preserve visual fidelity as closely as possible. So, while I could use 2,2,2,2 borders, the Lotus source doc really defines what these should be.

I've attached a zip containing the PDF, MDDL file and an image of the original source doc (just for reference).

As a side note, I mostly have access to both the Table border and the Cell borders individually in the source format. I am satisfied with the Migradoc way of simulating a table or table region border by altering the outside facing cell edges, just that when the colors aren't the same there's some overdraw going on I haven't found a way to eliminate.

Thanks
-Jeff


Attachments:
File comment: PDF, MDDL and JPG of source
3.22 Inner Cell and Outer Table Borders.zip [105 KiB]
Downloaded 585 times
Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 08, 2010 7:02 pm 
Offline

Joined: Wed Dec 08, 2010 6:35 pm
Posts: 2
How about setting the table border via SetEdge and then adding a paragraph to each cell and setting the paragraph's border instead of applying the border to the cell directly?

I think the fundamental issue is that all table borders are really drawn as cell borders. Cell borders also extend beyond their cell boundary resulting in overlap. That's ok when the border color is the same and opaque. It gets ugly when the border color changes or is partially transparent.

Frank.


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 [Bot] and 35 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