3

I want to know that which class should I use for creating blank pdf for writing my content into it through c# code but in the documentation of aspose.pdf they are suggesting to use Aspose.Pdf.Generator.Pdf class but that specific namespace is obsolete from Aspose.Pdf api.

1 Answer 1

4

@Shashank,

Aspose.Pdf.Genertor is obsolete but Aspose.Pdf namespace is new Document Object Model which provides the capabilities to create as well as manipulate existing PDF files. So as per your requirements, you can use this namespace to create PDF files from scratch. Note that all the features of legacy Aspose.Pdf.Generator are present in new DOM approach.

[c#]

// create Document instance
Aspose.Pdf.Document mypdf = new Aspose.Pdf.Document();
// add page to pages collection of Document instance
mypdf.Pages.Add();
// create TextFragment instance
Aspose.Pdf.Text.TextFragment fragment = new TextFragment("Hello World....");
// add fragment to first page of document
mypdf.Pages[1].Paragraphs.Add(fragment);
// save PDF document
mypdf.Save("c:/pdftest/PdfFile.pdf");
2
  • Thank you for the information. If you are aware of converting .eps file to .jpg or .pdf using aspose (or other api) can you help me with this? Jul 4, 2017 at 6:13
  • @ShashankChoudhari, We have an API named Apsose.Imaging which offers the feature to manipulate various image formats. But I am afraid, currently it does not support .EPS image formats. The feature request to support this format is logged as IMAGINGNET-2368. As soon as we have some updates, we will let you know.
    – codewarior
    Jul 5, 2017 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.