Solved

How to draw an ARC using iTextSharp

Posted on 2010-09-08
1
1,783 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
ID: 33633591
Don't worry.  After all that I found the "CurveTo" method that does what I want.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I recently read an article which suggested that 60% of businesses in the U.S. that process credit card details online in order to accept payment for goods or services were not Payment Card Industry security standards (PCI) compliant. This statement …
Read about how to choose the best possible content marketing agency to suit your needs. Content marketing has become an integral part of running a successful tech business, so it is wise to be informed.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
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…

828 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