• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Print as PDF via javascript / Flattening signatures

Explorer ,
Sep 14, 2020 Sep 14, 2020

Copy link to clipboard

Copied

Hi,

I have a signed PDF-Form "file1" that I need to mergend into another PDF "file2" that is also going to be signed later in the process. I don't need the real signatures of file1 in file2 (that doesn't work either because merging a signed PDF deletes the signatures), it suffices to preserve the signatures as textobjects in file2 (The result I'd like to have is exactly the result I get when I print file1 as a PDF (e.g. with printer "Adobe PDF"). Hereby the signatures will be obtained as texts in the printed PDF.).

So I claim to have to adjust file1 before merging to file2. Because I need this for about 100x a month, it should work with a javascript-button (folder level).

 

For adjusting file1 I had two approaches, both don't work:

 

Approach 1: Print as PDF via javascript

I found out that there is no way to print as PDF via Javascript. Is that true? Somehow like the printparams.filename does not work with a printer that opens a save dialog on its own. Is there any other possibility to get that?

 

Approach 2: Flatten the PDF via javascript

I tried this.flattenPages(), but that doesn't work with signatures...

 

Is there any possibility to get what I want?

Thanks!

TOPICS
Acrobat SDK and JavaScript

Views

571

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 14, 2020 Sep 14, 2020

Copy link to clipboard

Copied

You can't merge a signed PDF file with another file. Your whole approach to this is wrong. You need to first merge the two files, and then sign them. Doing it the other way around will either not work at all or will result in a file that is not signed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 14, 2020 Sep 14, 2020

Copy link to clipboard

Copied

I know that. But that's what our process look like. We don't need the "real" signatures of file1 in file2. So, yes, my approach will result in a file that is not signed. That's what I want to get.

 

Is there any possibility to get that?

 

[P.S. The background of the process is: We get file1 and sign file1. Two weeks later we have to attach file1 to file2 to get file2 to be signed by others. The person that signs file2 does not need to validate the signature of file1 (that's what other persons already did) so it's absolutely correct to lose the "real" signature". But to avoid questions we'd like to have the signature-suff still printed in the attachment.]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 14, 2020 Sep 14, 2020

Copy link to clipboard

Copied

A "printed" copy of a digital signature is meaningless. You might as well not have it all. In fact, not having it at all is better because some people might believe that the printed signature field means the file is signed, when in fact it's not. So I would say just use the original, unsigned version of file1 for the merging.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 14, 2020 Sep 14, 2020

Copy link to clipboard

Copied

Yes, I know. But we've discussed that topic a lot in my team and I don't want to lead the discussion again here, please...

 

So back to my just technical question (regardless of whether it makes sense or not): Is that technically possible?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 14, 2020 Sep 14, 2020

Copy link to clipboard

Copied

Not using the approaches you mentioned, as the signature prevents the script from editing the file, and it can't specify the file name when printing to the Adobe PDF printer, either. The only way I can think of is to re-create the file, for example by saving it as image files and then creating a new PDF file from them. This is a somewhat complicated scripting task, but I think it should be possible.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 17, 2020 Sep 17, 2020

Copy link to clipboard

Copied

LATEST

Thanks! Are there any other approaches that might lead to this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines