Very valid question!

Why??

But that aside, perhaps stamper.close() can help you ....

On 27/01/12 08:32, Leonard Rosenthol wrote:
> Why would you want/need to do this? 
> 
> Leonard
> 
> From: "[email protected] <mailto:[email protected]>"
> <[email protected] <mailto:[email protected]>>
> Reply-To: Post here <[email protected]
> <mailto:[email protected]>>
> Date: Thu, 26 Jan 2012 22:00:58 -0800
> To: Post here <[email protected]
> <mailto:[email protected]>>
> Subject: [iText-questions] ItextSharp to upgrade version of PDF
> 
> Hi All,
> 
>  
> 
> Is it possible to upgrade the version of old PDFs to higher versions
> using itextSharp?
> 
>  
> 
> I tried the following code to upgrade pdf version from 1.3 to 1.4, but
> version remains same.
> 
>  
> 
> publicstatic void SetPdfVersion(string pdfPath, string outputFile)
> 
>         {
> 
>            
> 
>                 //reader.GetPageContent(1)[4] = 4;
> 
>                 var reader = new PdfReader(pdfPath);
> 
>                 PdfStamper stamper;
> 
>                 using (stamper = new PdfStamper(reader, new
> FileStream(outputFile, FileMode.Create, FileAccess.Write, FileShare.None))){
> 
>                 stamper.Writer.SetPdfVersion(PdfWriter.PDF_VERSION_1_4);
> 
>                 stamper.FormFlattening = true;
> 
>                 }
> 
>         }
> 
>  
> 
> Any idea, why it’s not working?
> 
>  
> 
> Regards
> 
> -Saurabh
> 
> 
> 
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> 
> 
> 
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a 
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples: 
> http://itextpdf.com/themes/keywords.php

-- 
Balder VC
http://www.redlab.be/blog/
http://twitter.com/redlabbe

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to