Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Problems with PdfFileMend

$
0
0
Hi everyone,

I can't seem to get this piece of code to work.

It breaks on the first line saying:
System.NotSupportedException: The given path's format is not supported.

Can someone help me?

Here is my code in vb.net:

    Try
            'create PdfFileMend object to add text
            Dim mender As New PdfFileMend("‪C:\PDFS\formtest.pdf", "‪C:\PDFS\formtest2.pdf")

            'create formatted text
            Dim addtext As New FormattedText(text, metextcolour, metextbkcolour, mefontname, EncodingType.Winansi, True, mefontsize)

            'set whether to use Word Wrap or not and using which mode
            mender.IsWordWrap = True
            mender.WrapMode = WordWrapMode.Default

            'add text in the PDF file
            mender.AddText(addtext, pageno, lowerleftX, lowerleftY)

            'close PdfFileMend object
            mender.Close()

            Return "Success"
        Catch ex As Exception
            Return "Fail: " + ex.ToString()
        End Try

Viewing all articles
Browse latest Browse all 3131

Trending Articles