Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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
good
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.
 
Thanks...
  Permalink  
v2
Comments
Sasikumar.mohan at 28-Jan-13 5:52am
   
sorry how to give height and width values
Tadit Dash at 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 at 11-Apr-13 7:27am
   
sir how to update images dynamically in pdf page based on selected student ...reply ASAP plz
Tadit Dash at 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
Your Filters
Interested
Ignored
     
0 Guruprasad.K.Basavaraju 490
1 Shai Vashdi 474
2 Sergey Alexandrovich Kryukov 291
3 OriginalGriff 135
4 praveen_07 115
0 Sergey Alexandrovich Kryukov 9,185
1 OriginalGriff 5,335
2 Peter Leow 4,040
3 Maciej Los 3,540
4 Abhinav S 3,308


Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 28 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid