0

How version of a pdf file will be determined when converting byte array to a pdf file in C#.

Code:

File.Writeallbytes(path,bytes);

I have generated a pdf file using the above code in C#. If i check the version of that file it is showing 1.4 as a version. How it is taking the version.

Please note that Adobe Reader is not installed in my machine.

user3859666
  • 279
  • 1
  • 10
  • 24
  • *"I have generated a pdf file using the above code in C#"* - nope, you just wrote bytes into file, taken from somewhere, which contains complicated PDF format with version 1.4. You have to at minimum implement pdf format reader (see [wiki](https://en.wikipedia.org/wiki/Portable_Document_Format#File_structure)), if there is CRC for header block or anything like this - you are in troubles. – Sinatr Aug 02 '16 at 13:42
  • What component are you using to generate the PDF's? For instance, iTextSharp uses the setPdfVersion method to do it. http://stackoverflow.com/questions/6273676/set-pdf-version-using-itextsharp – ProgrammerV5 Aug 02 '16 at 13:42

0 Answers0