PdfFileMend.AddImage

AddImage(Stream, int, float, float, float, float)

Adds image to the specified page of PDF document at specified coordinates.

public bool AddImage(Stream imageStream, int pageNum, float lowerLeftX, float lowerLeftY, 
    float upperRightX, float upperRightY)
ParameterTypeDescription
imageStreamStreamInput image stream.
pageNumInt32The number of page that will receive the image.
lowerLeftXSingleThe lower left x of image rectangle.
lowerLeftYSingleThe lower left y of image rectangle.
upperRightXSingleThe upper right x of image rectangle.
upperRightYSingleThe upper right y of image rectangle.

Return Value

True if success false otherwise.

Examples

PdfFileMend mendor = new PdfFileMend("example.pdf", "out_example.pdf");
using (Stream stream = File.OpenRead("picture.jpg"))
{
    mendor.AddImage(stream, 1, 10, 10, 100, 100);
}
mendor.Close();

See Also


AddImage(Stream, int, float, float, float, float, CompositingParameters)

Adds image to the specified page of PDF document at specified coordinates.

public bool AddImage(Stream imageStream, int pageNum, float lowerLeftX, float lowerLeftY, 
    float upperRightX, float upperRightY, CompositingParameters compositingParameters)
ParameterTypeDescription
imageStreamStreamInput image stream.
pageNumInt32The number of page that will receive the image.
lowerLeftXSingleThe lower left x of image rectangle.
lowerLeftYSingleThe lower left y of image rectangle.
upperRightXSingleThe upper right x of image rectangle.
upperRightYSingleThe upper right y of image rectangle.
compositingParametersCompositingParametersThe graphics compositing parameters for the image.

Return Value

True if success false otherwise.

Examples

PdfFileMend mendor = new PdfFileMend("example.pdf", "out_example.pdf");
using (Stream stream = File.OpenRead("picture.jpg"))
{
    mendor.AddImage(stream, 1, 10, 10, 100, 100, new CompositingParameters(BlendMode.Multiply);
}
mendor.Close();

See Also


AddImage(Stream, int[], float, float, float, float)

Adds image to the specified pages of PDF document at specified coordinates.

public bool AddImage(Stream imageStream, int[] pageNums, float lowerLeftX, float lowerLeftY, 
    float upperRightX, float upperRightY)
ParameterTypeDescription
imageStreamStreamInput image stream.
pageNumsInt32[]The numbers of pages that will receive the image.
lowerLeftXSingleThe lower left x of image rectangle.
lowerLeftYSingleThe lower left y of image rectangle.
upperRightXSingleThe upper right x of image rectangle.
upperRightYSingleThe upper right y of image rectangle.

Return Value

True if success false otherwise.

Examples

PdfFileMend mendor = new PdfFileMend("example.pdf", "out_example.pdf");
using (Stream stream = File.OpenRead("picture.jpg"))
{
    mendor.AddImage(stream, new int[]{1, 2}, 10, 10, 100, 100);
}
mendor.Close();

See Also


AddImage(Stream, int[], float, float, float, float, CompositingParameters)

Adds image to the specified pages of PDF document at specified coordinates.

public bool AddImage(Stream imageStream, int[] pageNums, float lowerLeftX, float lowerLeftY, 
    float upperRightX, float upperRightY, CompositingParameters compositingParameters)
ParameterTypeDescription
imageStreamStreamInput image stream.
pageNumsInt32[]The numbers of pages that will receive the image.
lowerLeftXSingleThe lower left x of image rectangle.
lowerLeftYSingleThe lower left y of image rectangle.
upperRightXSingleThe upper right x of image rectangle.
upperRightYSingleThe upper right y of image rectangle.
compositingParametersCompositingParametersThe graphics compositing parameters for the images.

Return Value

True if success false otherwise.

Examples

PdfFileMend mendor = new PdfFileMend("example.pdf", "out_example.pdf");
using (Stream stream = File.OpenRead("picture.jpg"))
{
    mendor.AddImage(stream, new int[]{1, 2}, 10, 10, 100, 100, new CompositingParameters(BlendMode.Multiply);
}
mendor.Close();

See Also


AddImage(string, int, float, float, float, float)

Adds image to the specified page of PDF document at specified coordinates.

public bool AddImage(string imageName, int pageNum, float lowerLeftX, float lowerLeftY, 
    float upperRightX, float upperRightY)
ParameterTypeDescription
imageNameStringThe path of input image file.
pageNumInt32The number of page that will receive the image.
lowerLeftXSingleThe lower left x of image rectangle.
lowerLeftYSingleThe lower left y of image rectangle.
upperRightXSingleThe upper right x of image rectangle.
upperRightYSingleThe upper right y of image rectangle.

Return Value

True if success false otherwise.

Examples

PdfFileMend mendor = new PdfFileMend("example.pdf", "out_example.pdf");
mendor.AddImage("picture.jpg", 1, 10, 10, 100, 100);
mendor.Close();

See Also


AddImage(string, int, float, float, float, float, CompositingParameters)

Adds image to the specified page of PDF document at specified coordinates.

public bool AddImage(string imageName, int pageNum, float lowerLeftX, float lowerLeftY, 
    float upperRightX, float upperRightY, CompositingParameters compositingParameters)
ParameterTypeDescription
imageNameStringThe path of input image file.
pageNumInt32The number of page that will receive the image.
lowerLeftXSingleThe lower left x of image rectangle.
lowerLeftYSingleThe lower left y of image rectangle.
upperRightXSingleThe upper right x of image rectangle.
upperRightYSingleThe upper right y of image rectangle.
compositingParametersCompositingParametersThe graphics compositing parameters for the images.

Return Value

True if success false otherwise.

Examples

PdfFileMend mendor = new PdfFileMend("example.pdf", "out_example.pdf");
mendor.AddImage("picture.jpg", 1, 10, 10, 100, 100, new CompositingParameters(BlendMode.Multiply));
mendor.Close();

See Also


AddImage(string, int[], float, float, float, float)

Adds image to the specified pages of PDF document at specified coordinates.

public bool AddImage(string imageName, int[] pageNums, float lowerLeftX, float lowerLeftY, 
    float upperRightX, float upperRightY)
ParameterTypeDescription
imageNameStringThe path of input image file.
pageNumsInt32[]The numbers of pages that will receive the image.
lowerLeftXSingleThe lower left x of image rectangle.
lowerLeftYSingleThe lower left y of image rectangle.
upperRightXSingleThe upper right x of image rectangle.
upperRightYSingleThe upper right y of image rectangle.

Return Value

True if success false otherwise.

Examples

PdfFileMend mendor = new PdfFileMend("example.pdf", "out_example.pdf");
mendor.AddImage("picture.jpg", 1, 10, 10, 100, 100);
mendor.Close();

See Also


AddImage(string, int[], float, float, float, float, CompositingParameters)

Adds image to the specified pages of PDF document at specified coordinates.

public bool AddImage(string imageName, int[] pageNums, float lowerLeftX, float lowerLeftY, 
    float upperRightX, float upperRightY, CompositingParameters compositingParameters)
ParameterTypeDescription
imageNameStringThe path of input image file.
pageNumsInt32[]The numbers of pages that will receive the image.
lowerLeftXSingleThe lower left x of image rectangle.
lowerLeftYSingleThe lower left y of image rectangle.
upperRightXSingleThe upper right x of image rectangle.
upperRightYSingleThe upper right y of image rectangle.
compositingParametersCompositingParametersThe graphics compositing parameters for the images.

Return Value

True if success false otherwise.

Examples

PdfFileMend mendor = new PdfFileMend("example.pdf", "out_example.pdf");
mendor.AddImage("picture.jpg", 1, 10, 10, 100, 100, new CompositingParameters(BlendMode.Multiply));
mendor.Close();

See Also