How to add images to a new pdf page-gdpicture. Net tutorial

Source: Internet
Author: User

You can use gdpicture. Net to export imagesPDFAnd can be edited. For example, if the exported PDF image has many pages, you can quickly add images to the PDF file, locate and add images on any pdf page.

"Gdpicture. Net latest trial version

The sample code is as follows:

Dim oGdPicturePDF As New GdPicturePDF        Dim oGdPictureImaging As New GdPictureImaging        oGdPicturePDF.LoadFromFile("c:\input.pdf", False)        Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("c:\input.tif")        oGdPicturePDF.SelectPage(1)        Dim pageWidth As Single = oGdPicturePDF.GetPageWidth        Dim pageHeight As Single = oGdPicturePDF.GetPageHeight        oGdPicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitPoint)        oGdPicturePDF.SetOrigin(PdfOrigin.PdfOriginBottomLeft)        Dim imageResName As String = oGdPicturePDF.AddImageFromGdPictureImage(ImageID, False, False)        oGdPictureImaging.ReleaseGdPictureImage(ImageID)        oGdPicturePDF.DrawImage(imageResName, pageWidth / 3, pageHeight / 3, pageWidth / 3, pageHeight / 3)        oGdPicturePDF.SaveToFile("c:\output.pdf")        oGdPicturePDF.CloseDocument()

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.