PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 10:45 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: A version of PDF
PostPosted: Mon Mar 09, 2009 11:21 am 
Offline

Joined: Mon Mar 09, 2009 11:19 am
Posts: 12
Hello,

How we can save the pdf file on version 17, with the pdfsharp we can save the pdf in 12,13 or 14 but not 17, please help me to resolve this great problem, thank you verry mutch.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Mar 09, 2009 12:42 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
Hi!

PDFsharp 1.2 already supports settings the version to 17.

This is open source - you can change the code to allow versions beyond 17.
This should work (but you won't be able to use Acrobat 9 features without further modifications).

Do you need new features? Or is it just the version number you need?

Here's the code:
Code:
public int Version
{
  get { return this.version; }
  set
  {
    if (!CanModify)
      throw new InvalidOperationException(PSSR.CannotModify);
    if (value < 12 || value > 17) // TODO not really implemented
      throw new ArgumentException(PSSR.InvalidVersionNumber, "value");
    this.version = value;
  }
}
internal int version;

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Mar 09, 2009 1:03 pm 
Offline

Joined: Mon Mar 09, 2009 11:19 am
Posts: 12
Thomas Hoevel wrote:
Hi!

PDFsharp 1.2 already supports settings the version to 17.

This is open source - you can change the code to allow versions beyond 17.
This should work (but you won't be able to use Acrobat 9 features without further modifications).

Do you need new features? Or is it just the version number you need?

Here's the code:
Code:
public int Version
{
  get { return this.version; }
  set
  {
    if (!CanModify)
      throw new InvalidOperationException(PSSR.CannotModify);
    if (value < 12 || value > 17) // TODO not really implemented
      throw new ArgumentException(PSSR.InvalidVersionNumber, "value");
    this.version = value;
  }
}
internal int version;



Thank you verry mutch for your answer, i just need to modify the version on 17, but how i can modify this, i have introduce the pdfsharp dll in references, but when i search public int version (), i can't modify it, hel me please, thank you verry mutch.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 10, 2009 7:52 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
This is how it works in C#:
Code:
PdfDocument pdfDocument = new PdfDocument();
pdfDocument.Version = 17;

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 381 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group