writer.getDirectContent() -> writer.DirectContent

Graphics2D has no correspondence in the .NET world, it's a Java only thing.
I don't know if you would also expect to find a JPanel or a JFrame.

----- Original Message ----- 
From: "Jay" <[EMAIL PROTECTED]>
To: "Paulo Soares" <[EMAIL PROTECTED]>
Sent: Sunday, August 07, 2005 6:24 PM
Subject: Re: [iText-questions] iTextSharp for .NET examples


Thank You Paulos for the info.  I am having a little trouble finding the
corresponding methods such as follows:
Thanks for your help
private void print() {

Document document = new Document(PageSize.A4.rotate());

Document.compress = false;

try {

PdfWriter writer =

PdfWriter.getInstance(document, new FileOutputStream("c:\\jTable.pdf"));


document.open();

PdfContentByte cb = writer.getDirectContent();   <<----------------this
method does not exist in the pdf writer object


// Create the graphics as shapes

cb.saveState();

Graphics2D g2 = cb.createGraphicsShapes(500, 500);    <-this method does not
exist and I can't find the Graphics2D datatype



// Print the table to the graphics

Shape oldClip = g2.getClip();<------------------I can't find the Shape data
type

g2.clipRect(10, 10, 500, 500);

table.print(g2);

g2.setClip(oldClip);


g2.dispose();

cb.restoreState();


document.newPage();


// Create the graphics with pdf fonts

cb.saveState();

g2 = cb.createGraphics(500, 500);


// Print the table to the graphics

oldClip = g2.getClip();

g2.clipRect(10, 10, 500, 500);

table.print(g2);

g2.setClip(oldClip);


g2.dispose();

cb.restoreState();


} catch (DocumentException de) {

System.err.println(de.getMessage());

} catch (IOException ioe) {

System.err.println(ioe.getMessage());

}


document.close();

}

----- Original Message ----- 
From: "Paulo Soares" <[EMAIL PROTECTED]>
To: "Jay" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Sunday, August 07, 2005 11:02 AM
Subject: Re: [iText-questions] iTextSharp for .NET examples


> No but you don't really need them. Get the java examples from
> http://www.lowagie.com/iText and adapt them to the C# or VB syntax.
> Changes
> are nothing more that capitalizing the method names and using some
> properties. For example PdfPTable.setWidthPercentage() was changed to the
> property PdfPTable.WidthPercentage or AcroFields.setField() is
> AcroFields.SetField(). Only signatures and resource finding is different.
>
> You have a mailing list to discuss this and other itextsharp problems at
> http://lists.sourceforge.net/mailman/listinfo/itextsharp-questions
>
> ----- Original Message ----- 
> From: "Jay" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Sunday, August 07, 2005 4:06 PM
> Subject: [iText-questions] iTextSharp for .NET examples
>
>
> Are there any .NET examples for VB or C# that you know of?
>
> Thank You!
>

-- 
I am using the free version of SPAMfighter for private users.
It has removed 3664 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to