PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Migradoc - Adding elements

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
lucio_tanaka



Joined: 29 Nov 2006
Posts: 1

PostPosted: Wed Nov 29, 2006 6:17 pm    Post subject: Migradoc - Adding elements Reply with quote

In the HelloMigraDoc there is an example that shows how to add "Paragraph", "Chart", "Image" and "Table".

The method MigraDoc.DocumentObjectModel.Section.Add works with "Paragraphs", "Charts", "Images","Tables" and "TextFrames".

Im trying to add a barcode and a single line in a section.
Is it possible?
How can i do this?
Back to top
View user's profile Send private message
Stefan Lange



Joined: 12 Oct 2006
Posts: 47
Location: Cologne, Germany

PostPosted: Thu Nov 30, 2006 8:01 pm    Post subject: Reply with quote

Hello,

"Paragraphs", "Charts", "Images","Tables" and "TextFrames" are so called 'document elements' and are added to sections. Formatted text and Barcodes are 'paragraph elements' and can be added to paragraphs and cells of a table.
To add barcode and a single line, you must first add a paragraph.

Regards
Stefan Lange
Back to top
View user's profile Send private message Send e-mail
sklett



Joined: 20 Jul 2007
Posts: 5

PostPosted: Fri Jul 27, 2007 3:28 pm    Post subject: Reply with quote

I've run into a problem with Barcodes and so far looking over the code I haven't been able to find the solution. When I add a Barcode to a table cell, the barcode is rendered at 0,0 (top right corner of the document)

I've tried to see how the position is set for other elements when added to a cell but haven't found anything. Can anyone point me to the section of code where the position of a Cell's child elements is set?

Thanks for any help.
-Steve
Back to top
View user's profile Send private message
sklett



Joined: 20 Jul 2007
Posts: 5

PostPosted: Fri Jul 27, 2007 7:11 pm    Post subject: Reply with quote

I have a solution (well, i think it's a solution) for the barcode not rendering in the cell.

If you change this line:
Code:
//gfx.DrawBarCode(bc, xb, new XPoint(barcode.Left.Position, barcode.Top.Position));


To this:
Code:
gfx.DrawBarCode(bc, xb, new XPoint(this.renderInfo.LayoutInfo.ContentArea.X, this.renderInfo.LayoutInfo.ContentArea.Y));


it will render in the *almost* correct position. I need to take the padding into account, still have some more work to do.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com