Announcement

Collapse
No announcement yet.

Add text, image or barcode to pdf

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Add text, image or barcode to pdf

    Hi,

    I have an Enterprise license for the Foxit Merger. When i open a pdf and draw it as byte[], everything is ok.

    Foxit.PDF.Merger.MergeDocument document = new Foxit.PDF.Merger.MergeDocument(HostingEnvironment. MapPath(pdfPath));
    return document.Draw();

    But when i want to add some text to the pdf the evaluation text is added to the output.

    Foxit.PDF.Merger.MergeDocument document = new Foxit.PDF.Merger.MergeDocument(HostingEnvironment. MapPath(pdfPath));
    document.Form.Fields["Test1"].Value = "TEST";
    return document.Draw();

    Or when i use PageElements

    Foxit.PDF.Merger.MergeDocument document = new Foxit.PDF.Merger.MergeDocument(HostingEnvironment. MapPath(pdfPath));
    Foxit.PDF.Merger.ImportedPage page = new Foxit.PDF.Merger.ImportedPage(document.GetPage(1)) ;
    TextArea textArea = new TextArea(
    text,
    x * centimeterToPointConversionNumber,
    y * centimeterToPointConversionNumber,
    width * centimeterToPointConversionNumber,
    height * centimeterToPointConversionNumber,
    Foxit.PDF.Font.Courier,
    fontSize)
    {
    Align = textAlignment,
    Angle = angle
    };

    page.Elements.Add(textArea);


    I dont know what im doing wrong.

  • #2
    Here is the youtube video that will help you out: link
    happy wheels

    Comment


    • #3
      How Can I Add Barcode in Text?

      Comment


      • #4
        zinavo Thanks for your post.For SDK questions or problems,please help to mail to adv.support@foxitsoftware.com directly and our SDK engineers will further help you via email.

        Comment

        Working...
        X