Quantcast

Use itextsharp create new pdf copy from existing file keeping signature

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Use itextsharp create new pdf copy from existing file keeping signature

Gonçalo Martins
Hi everyone,

I'm using iTextSharp for the first time this week and I have some problems related to the following task:
I need a C# method to:
1- receive a file path, read the related PDF and,
2- set the "PDFXConformance" property,
3- Embed one new Font and
4-maintain the digital signatures that the PDF have.

Can you please help me on this with some method or code snippets to do each task, using iTextSharp?

Thank you,

G.V.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[hidden email]
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Use itextsharp create new pdf copy from existing file keeping signature

iText Info
On 7/08/2012 12:57, Gonçalo Martins wrote:
Hi everyone,

I'm using iTextSharp for the first time this week and I have some problems related to the following task:
I need a C# method to:
1- receive a file path, read the related PDF and,

OK.

2- set the "PDFXConformance" property,

Just setting the property isn't difficult.
Making sure the document passes a validation test: extremely difficult!
I don't know of any software that does this "automagically".
All the software I know requires human (manual) intervention:
- make decisions about colors,
- choose a substitution font,
- ...

3- Embed one new Font and

OK, that will work in some cases, but not always.
Embedding a font may require rewriting the complete content stream.
But it's no use making an assessment about the workload, because:

4-maintain the digital signatures that the PDF have.

That is impossible! Imagine a closed box that is sealed.
What you're asking is: I want to put some stuff in that box without a seal.
I count on your common sense to understand that this is impossible.
We're software developers, Gonçalo, NOT magicians.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[hidden email]
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Use itextsharp create new pdf copy from existing file keeping signature

Gonçalo Martins
Date: Tue, 7 Aug 2012 13:35:01 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [iText-questions] Use itextsharp create new pdf copy from existing file keeping signature

On 7/08/2012 12:57, Gonçalo Martins wrote:
Hi everyone,

I'm using iTextSharp for the first time this week and I have some problems related to the following task:
I need a C# method to:
1- receive a file path, read the related PDF and,

OK.
-> Ok, this is the easy part..

2- set the "PDFXConformance" property,

Just setting the property isn't difficult.
Making sure the document passes a validation test: extremely difficult!
I don't know of any software that does this "automagically".
All the software I know requires human (manual) intervention:
- make decisions about colors,
- choose a substitution font,
- ...

-> Is there any way, using iTextSharp to validate the PDFXConformance?

3- Embed one new Font and

OK, that will work in some cases, but not always.
Embedding a font may require rewriting the complete content stream.
But it's no use making an assessment about the workload, because:

-> The requirement of this issue is in a controlled use case where we only can use 2types of Fonts.In this case can you tell me how and what objects should I use (a code snippet of it).

4-maintain the digital signatures that the PDF have.

That is impossible! Imagine a closed box that is sealed.
What you're asking is: I want to put some stuff in that box without a seal.
I count on your common sense to understand that this is impossible.
We're software developers, Gonçalo, NOT magicians.

-> I understand that and had the idea that it's not possible..But I never worked with iTextSharp before and didn't knew the "magic" that it can do and if you found any workaround to do this..





------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[hidden email]
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Use itextsharp create new pdf copy from existing file keeping signature

iText Info
On 7/08/2012 14:33, Gonçalo Martins wrote:
-> Is there any way, using iTextSharp to validate the PDFXConformance?

No, that's not what iText does. You need other software for PDF/X validation. You won't find any free software to do that.


-> The requirement of this issue is in a controlled use case where we only can use 2types of Fonts.In this case can you tell me how and what objects should I use (a code snippet of it).

Even in a controlled environment, it's not always simple: http://1t3xt.be/?13b


-> I understand that and had the idea that it's not possible..But I never worked with iTextSharp before and didn't knew the "magic" that it can do and if you found any workaround to do this..

Er... you make it sound as if there's a link between the impossibility of changing a PDF into a PDF/X file without breaking the signature, and having knowledge about iTextSharp.
There is none: what you were asking for was impossible in general, regardless of the tool you're using.

I'm very much in favor of iText and I'm flattered you want to use it (I wrote a huge part of it), but I think you're wasting your time here: It's as if you're trying to mow your lawn with a BMW. Some people think a BMW is such a nice and complete vehicle, that they also want to be able to mow their lawn with it. But that's not going to work.

Check http://www.enfocus.com/ or look for an Adobe product to achieve what you need. Leonard will be happy to help you out if you chose to work with Adobe software.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[hidden email]
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Use itextsharp create new pdf copy from existing file keeping signature

Gonçalo Martins
Thank  you for your help..
And I didn't wanted to do any kind of elations as you so ironically said, because I know all the restrictions according to this issue.
Since I'm new with a thing I have to ask and try to understand all the features included.
Continue your good work..

Regards

G.V.


Date: Tue, 7 Aug 2012 14:48:14 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [iText-questions] Use itextsharp create new pdf copy from existing file keeping signature

On 7/08/2012 14:33, Gonçalo Martins wrote:
-> Is there any way, using iTextSharp to validate the PDFXConformance?

No, that's not what iText does. You need other software for PDF/X validation. You won't find any free software to do that.


-> The requirement of this issue is in a controlled use case where we only can use 2types of Fonts.In this case can you tell me how and what objects should I use (a code snippet of it).

Even in a controlled environment, it's not always simple: http://1t3xt.be/?13b


-> I understand that and had the idea that it's not possible..But I never worked with iTextSharp before and didn't knew the "magic" that it can do and if you found any workaround to do this..

Er... you make it sound as if there's a link between the impossibility of changing a PDF into a PDF/X file without breaking the signature, and having knowledge about iTextSharp.
There is none: what you were asking for was impossible in general, regardless of the tool you're using.

I'm very much in favor of iText and I'm flattered you want to use it (I wrote a huge part of it), but I think you're wasting your time here: It's as if you're trying to mow your lawn with a BMW. Some people think a BMW is such a nice and complete vehicle, that they also want to be able to mow their lawn with it. But that's not going to work.

Check http://www.enfocus.com/ or look for an Adobe product to achieve what you need. Leonard will be happy to help you out if you chose to work with Adobe software.

------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ iText-questions mailing list [hidden email] 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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[hidden email]
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
Loading...