Making annotations permanent
Making annotations permanent
Can you show me how to make an annotation to an image permanent? We're wanting to write a barcode onto the page. Thanks in advance.
Re: Making annotations permanent
Some additional detail...we are reading a PDF file, copying the pages to a new PDF file and applying a barcode to the document during that process. We add the barcode (works on our test app writing to tiff document) but the text does not show up on our output pdf. Please advise. Thanks in advance. Here is our code:
Code: Select all
'load PDF
oGDV.DisplayFromFile(strSavePath)
'start new PDF
GDPIDNew = oGDP.PdfNewPdf(strFinalSavedPath)
'add pages from original PDF
pc = oGDV.PageCount
For p = 1 To pc
GDPIDSource = oGDV.PdfRenderPageToGdPictureImage(300, p)
oGDP.PdfAddImageFromGdPictureImage(GDPIDSource, p)
oGDP.ReleaseGdPictureImage(GDPIDSource)
If p = 1 Then
'endorse barcodes onto document
oGDP.DrawText(GDPIDNew, "*R000001*", oGDP.GetWidth(GDPIDNew) - 450, 50, 40, GdPicture.FontStyle.FontStyleRegular, Color.Black, "Free 3 of 9", True)
oGDP.DrawText(GDPIDNew, "*D000123*", oGDP.GetWidth(GDPIDNew) - 450, 150, 40, GdPicture.FontStyle.FontStyleRegular, Color.Black, "Free 3 of 9", True)
End If
Next
'Now we have to draw all images of the PDF on its pages
For p = 1 To pc
CurrentPageWidth = oGDP.PdfGetImageWidth(GDPIDNew, p)
CurrentPageHeight = oGDP.PdfGetImageHeight(GDPIDNew, p)
oGDP.PdfNewPage(GDPIDNew)
oGDP.PdfSetPageDimensions(GDPIDNew, CurrentPageWidth, CurrentPageHeight)
oGDP.PdfDrawImage(GDPIDNew, p, 1, 1, CurrentPageWidth, CurrentPageHeight)
Next
'close PDF file
oGDP.PdfEndPdf(GDPIDNew)
oGDP.ReleaseGdPictureImage(GDPIDNew)
Who is online
Users browsing this forum: No registered users and 2 guests