how page size of pdf using itextsharp? using pdf reader number of pages getting pdf . please provide code calculating size of pdf
thank in advance
have @ webified itextsharp example pageinformation.cs corresponding pageinformation.java chapter 6 of itext in action — 2nd edition outputs multiple bits of information document using itextsharp. central method this:
public static void inspect(stringbuilder sb, byte[] pdf, string filename) { pdfreader reader = new pdfreader(pdf); sb.append(filename); sb.append(environment.newline); sb.append("number of pages: "); sb.append(reader.numberofpages); sb.append(environment.newline); rectangle mediabox = reader.getpagesize(1); sb.append("size of page 1: ["); sb.append(mediabox.left); sb.append(','); sb.append(mediabox.bottom); sb.append(','); sb.append(mediabox.right); sb.append(','); sb.append(mediabox.top); sb.append("]"); sb.append(environment.newline); sb.append("rotation of page 1: "); sb.append(reader.getpagerotation(1)); sb.append(environment.newline); sb.append("page size rotation of page 1: "); sb.append(reader.getpagesizewithrotation(1)); sb.append(environment.newline); sb.append("is rebuilt? "); sb.append(reader.isrebuilt().tostring()); sb.append(environment.newline); sb.append("is encrypted? "); sb.append(reader.isencrypted().tostring()); sb.append(environment.newline); sb.append(environment.newline); }
Comments
Post a Comment