Click here to Skip to main content
15,916,702 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to set a image height and width property in pdf file i'm using Gios.pdf library
Posted

1 solution

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.
C#
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.
C#
int height  = image.Height;
int width = image.Width;


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

Thanks...
 
Share this answer
 
v2
Comments
Sasikumar.mohan 28-Jan-13 5:52am    
sorry how to give height and width values
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
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900