Solved

How to draw an ARC using iTextSharp

Posted on 2010-09-08
1
1,749 Views
Last Modified: 2013-11-18
Hi there,
I have been producing my own pdf documents using VB.NET and iTextSharp.  So far it has all been going ok but I can't seem to be able to draw an arc.  No matter what I try it always seems to end up being a straight line.

Can someone please help me.

I have tried many different combinations of values.  The line that is generated moves but is still a straight line.

I'm trying to draw half of an ellipse.

Dim FileStream as new IO.FileStream("C:\test.pdf", IO.FileMode.Create)

Dim doc As new Document

Dim writer As iTextSharp.text.pdf.PdfWriter = pdf.PdfWriter.GetInstance(doc, FileStream)

Dim cb As PdfContentByte = writer.DirectContent



doc.SetPageSize(PageSize.A4)



cb.Arc(100, 100, 100, 200, 135, 180)

cb.Stroke()



FileStream.Close()

FileStream.Dispose()

Open in new window

0
Comment
Question by:SoLost
1 Comment
 
LVL 5

Accepted Solution

by:
SoLost earned 0 total points
Comment Utility
Don't worry.  After all that I found the "CurveTo" method that does what I want.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

E-commerce is quite a gambling world, and you should never entrust your business to a lucky chance. In order to outrun your competitors in a race to attract as many customers as possible, you need to have a well thought-out strategy under your belt.…
Are you using email marketing software? If not, you're missing out on effortless marketing and the reaching of desired conversion rates through email marketing software.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now