Solved

How to draw an ARC using iTextSharp

Posted on 2010-09-08
1
1,829 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

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

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.…
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
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…
Suggested Courses

628 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