PDF Draw a text
PDF Draw a text
Hi,
I can't to draw a text in a PDF if this PDF has a font integrated.
This PDF is generated from a Panasonic scanner.
If I convert a PDF in TIFF and after TIFF to PDF, the font is not present and I can to draw a text...
I hope that you understand me.
Bye
Massimo
I have 8.5 release...
I can't to draw a text in a PDF if this PDF has a font integrated.
This PDF is generated from a Panasonic scanner.
If I convert a PDF in TIFF and after TIFF to PDF, the font is not present and I can to draw a text...
I hope that you understand me.
Bye
Massimo
I have 8.5 release...
Re: PDF Draw a text
Hi Maxvalt
I do not understand why you say : I can't to draw a text in a PDF if this PDF has a font integrated
GdPicture can add text to any PDF.
Look at the sample for the AddTrueTypeFont Method
https://www.gdpicture.com/guides/gdpicture/web ... eFont.html
Jean-Luc
I do not understand why you say : I can't to draw a text in a PDF if this PDF has a font integrated
GdPicture can add text to any PDF.
Look at the sample for the AddTrueTypeFont Method
https://www.gdpicture.com/guides/gdpicture/web ... eFont.html
Jean-Luc
Re: PDF Draw a text
Hi Jean
I used the example code and I have this error : This pdf does not have a first page
but it has 15 pages... I check with MessageBox.Show(oGdPicturePDF.GetPageCount)
do you have any ides ?
Thanks in advance.
I used the example code and I have this error : This pdf does not have a first page
but it has 15 pages... I check with MessageBox.Show(oGdPicturePDF.GetPageCount)
do you have any ides ?
Thanks in advance.
Re: PDF Draw a text
Hi Maxvalt.
Can you attach the pdf ?
Jean-Luc
Can you attach the pdf ?
Jean-Luc
Re: PDF Draw a text
Hi Jean
In attach a PDF example zipped and the code that I use.
Thanks in advance.
M
In attach a PDF example zipped and the code that I use.
Thanks in advance.
M
Code: Select all
Dim oGdPicturePDF As New GdPicturePDF
Dim status As GdPictureStatus = oGdPicturePDF.LoadFromFile("D:\Test\2.pdf", False)
If status = GdPictureStatus.OK Then
MessageBox.Show(oGdPicturePDF.GetPageCount) ' 18 pages....
status = oGdPicturePDF.SelectPage(1) ' in error....
If status = GdPictureStatus.OK Then
Dim FontResName As String = oGdPicturePDF.AddTrueTypeFont("Times new Roman", False, False, False)
If FontResName = "" Then
MessageBox.Show("Unknown truetype system font")
Else
oGdPicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitMillimeter)
oGdPicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
oGdPicturePDF.SetTextSize(30)
status = oGdPicturePDF.DrawText(FontResName, 10, 10, "Here is some text")
If status = GdPictureStatus.OK Then
oGdPicturePDF.SaveToFile("test_AddTrueTypeFont_func.pdf", False)
MessageBox.Show("Ok")
Else
MessageBox.Show("DrawText function failed")
End If
End If
Else
MessageBox.Show("This pdf does not have a first page", "Error")
End If
Else
MessageBox.Show("The file can't be opened")
End If
- Attachments
-
- 2.zip
- (146.79 KiB) Downloaded 307 times
Re: PDF Draw a text
Hi Maxvalt.
I run your code as is and i can not reproduce your error.
I have attached the resulting file.
Makes sure you are using our last release version 11.2.21 at ww.gdpicture.com/download-gdpicture/
Jean-Luc
I run your code as is and i can not reproduce your error.
I have attached the resulting file.
Makes sure you are using our last release version 11.2.21 at ww.gdpicture.com/download-gdpicture/
Jean-Luc
- Attachments
-
- test_AddTrueTypeFont_func.zip
- (146.96 KiB) Downloaded 359 times
Re: PDF Draw a text
Hi Jean
but I have not the last release....I have 8.5 ...
Do you know if exist a path o major release of 8.5 ?
Thanks.
M
but I have not the last release....I have 8.5 ...
Do you know if exist a path o major release of 8.5 ?
Thanks.
M
Re: PDF Draw a text
Hi Maxvalt
These version is no longer maintained for several years.
All i can say is to upgrade to our lastest version.
Jean-Luc.
These version is no longer maintained for several years.
All i can say is to upgrade to our lastest version.
Jean-Luc.
Who is online
Users browsing this forum: No registered users and 1 guest