|
-
Apr 16th, 2014, 12:17 AM
#1
Thread Starter
Hyperactive Member
How do i change PDF version to 1.4 using iTextSharp
Hello all
I have a PDF file with version 1.5, I want to change its version to 1.4 using iTextSharp, I tried with following code but failed to change the version, How can I do it
Here is my code to change the version
Code:
string szFile = @"D:\\kk.pdf";
using (PdfReader reader = new PdfReader(@"C:\\OCR.pdf"))
{
using (PdfStamper stamper = new PdfStamper(reader, new FileStream(szFile, FileMode.Create)))
{
stamper.Writer.SetPdfVersion(PdfWriter.PDF_VERSION_1_4);
}
}
Code executed successfully but PDF version remain unchanged,
Thanks in advance
koolprasad2003
MCP, MCTS, Microsoft MVP [Asp.Net/IIS]
For more .NET development tips visit .NET Tips
If the post is useful then please  Rate it
-
Nov 19th, 2014, 08:20 AM
#2
New Member
Re: How do i change PDF version to 1.4 using iTextSharp
koolprasad2003 I haven't used iTextSharp because I used another library called lead tools but one logical
option is by loading the PDF using iTextSharp changing the version and then saving it back.
I found the following link that I think can help:
http://stackoverflow.com/questions/2...ing-itextsharp
-
Nov 19th, 2014, 10:01 AM
#3
Re: How do i change PDF version to 1.4 using iTextSharp
Oddly, Kool replied to that very thread that had the solution in it...
-tg
-
Nov 20th, 2014, 03:54 PM
#4
New Member
Re: How do i change PDF version to 1.4 using iTextSharp
Good catch tg!
I actually didn't notice that koolprasad2003 asked the same question both here and on stackoverflow. I was more focused on the contents of the question.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|