Click here to Skip to main content
15,885,184 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I'm trying to create PDF using PDF clown.tried many codes which are available in google.But none of them worked getting exceptions with 1.2 released version .And also tried with 2.0(not free zed version code).Its not working.Ca any one help me how to create a PDf dynamically by using PDF Clown.I need only PDF Clown.Its the requirment.
Posted
Comments
AnvilRanger 25-Mar-15 15:46pm    
What do you mean by not working? Where is your code? What have you tried? We cannot see your screen, your computer, or your hard drive. You need to provide much more information if you expect and help.
Usha Sanjee 25-Mar-15 23:44pm    
public void Getdata()
{
org.pdfclown.documents.contents.fonts.StandardType1Font fnts=null;
FileStream streams=new FileStream("abc.pdf",FileMode.Create);
org.pdfclown.bytes. Stream pdfstream = new org.pdfclown.bytes. Stream (streams);
org.pdfclown.files.File pdf = new org.pdfclown.files.File();
org.pdfclown.documents.Page page = new org.pdfclown.documents.Page(pdf.Document);
pdf.Document.Pages.Add(page);
// fnts=new StandardType1Font(pdf, org.pdfclown.documents.contents.fonts.StandardType1Font.FamilyEnum.Times, false, false);

org.pdfclown.documents.contents.fonts.StandardType1Font fonts = new(pdf, org.pdfclown.documents.contents.fonts.StandardType1Font.FamilyEnum.Times, false, false);
org.pdfclown.documents.contents.composition.PrimitiveComposer composer=new org.pdfclown.documents.contents.composition.PrimitiveComposer(page);
org.pdfclown.documents.contents.composition.BlockComposer blockComposer = new org.pdfclown.documents.contents.composition.BlockComposer(composer);
//blockComposer.Begin( org.pdfclown.documents.contents Drawing. RectangleF (230, 400, 200, 200), composition. XAlignmentEnum .Left, composition. YAlignmentEnum .Top)
blockComposer.ShowText("This is Usha sanjee");
//composer.SetFont(subtitleFont, 20);
composer.SetFillColor( org.pdfclown.documents.contents.colorSpaces.DeviceRGBColor.Black);
blockComposer.ShowText("test");
blockComposer.End();
composer.Flush();
pdf.Save(pdfstream, org.pdfclown.files.SerializationModeEnum.Standard);


}


This is one of the code I have tried
What are the exceptions you are getting?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900