Click here to Skip to main content
13,046,562 members (70,554 online)
Rate this:
Please Sign up or sign in to vote.
See more:
how to set a image height and width property in pdf file i'm using Gios.pdf library
Posted 27-Jan-13 20:24pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You cannot set the image height and width using Gios.pdf library.

As I referred the Example 2 in the code samples provided in the article - Gios PDF .NET library[^], I found that the following code creates one pdf image to be added to the pdf document.
PdfImage image = myPdfDocument.NewImage("FileName.jpg");

And after that you can get the height and width of image by the following code, but cannot set these.
int height  = image.Height;
int width = image.Width;

So, you can only display image with its predefined properties set while insertion.

Sasikumar.mohan 28-Jan-13 5:52am
sorry how to give height and width values
Tadit Dash 28-Jan-13 6:10am
As I said, you cannot do this using Gios.pdf library.
So, you can set the height and width during the insertion/uploading of image to the DataBase. So, this info will be stored in byte format, if the Datatype is Image.

And when you will retrieve that byte information, you will automatically get that from DataBase, so no need to set that while displaying image.
Sasikumar.mohan 11-Apr-13 7:27am
sir how to update images dynamically in pdf page based on selected student ...reply ASAP plz
Tadit Dash 11-Apr-13 7:46am
Could not get you ? Can you explain more ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 28 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100