PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Oct 03, 2024 10:28 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 21 posts ] 
Author Message
PostPosted: Tue Mar 13, 2018 12:02 am 
Offline

Joined: Mon Mar 12, 2018 11:50 pm
Posts: 5
I am trying to open and modify a pdf template with pdfSharp which contains some acrofields.
I want to fill the acrofields with some content, make them readonly afterwards and save the pdf document.

All seems to work fine, but when I open the generated document with acrobat reader and close it again, it always prompts me if I want to save the changes.

This is my code:

Code:
public void generateTestDocument()
{
    PdfDocument pdfDocument = PdfReader.Open("Template.pdf", PdfDocumentOpenMode.Modify);
           
    if(pdfDocument != null)
    {
        PdfAcroForm acroForm = pdfDocument.AcroForm;
        if (acroForm != null)
        {
            PdfAcroField.PdfAcroFieldCollection fields = acroForm.Fields;
            string[] names = fields.Names;

            for (int i = 0; i < names.Length; i++)
            {
                string fqName = names[i];
                PdfAcroField field = fields[fqName];
                PdfTextField txtField;

                if ((txtField = field as PdfTextField) != null)
                {                           
                    txtField.Value = new PdfString(fqName);
                    txtField.ReadOnly = true;                           
                }
            }
        }

        pdfDocument.Save("GeneratedDocument.pdf");
    }
}




When saving the document all acrofields should be set to readonly, so there is no reason for asking the user if he wants to save changes.

So I want to disable this prompt for the generated document. Can someone help me?


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 13, 2018 9:39 am 
Offline
PDFsharp Guru
User avatar

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

You only set text fields to read only. Maybe you should do that for all form fields.

What are the differences between the PDF file generated by PDFsharp and the PDF file saved by Adobe Reader?

See also:
viewtopic.php?p=10610#p10610
I think the Flatten() method is included with the latest versions of PDFsharp.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 13, 2018 10:24 am 
Offline

Joined: Mon Mar 12, 2018 11:50 pm
Posts: 5
Hi Thomas,

thank you very much for your fast reply. I tested to set all fields to readonly, but that didn't solve the problem.

I am not sure what the difference between the documents is, that's what I want to find out. When I click on "save changes" in acrobat reader and open/close the document the second time, then it closes without asking to save changes. So it seems like pdfsharp is setting some parameter that there are unsaved changes in the document.

Is there already a nuget packet for the latest version that I need for the flatten() method?


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 13, 2018 10:38 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3110
Location: Cologne, Germany
hoebd wrote:
Is there already a nuget packet for the latest version that I need for the flatten() method?
Should be included in any package from the last 6 months.
The latest and recommended packages have version 1.50.4790-beta5a.

hoebd wrote:
I am not sure what the difference between the documents is, that's what I want to find out.
Compare the PDF file from PDFsharp and the file from Adobe Reader with a Diff tool.
It can help to make a minimal PDF with just one page and one textfield.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 15, 2018 9:33 pm 
Offline

Joined: Mon Mar 12, 2018 11:50 pm
Posts: 5
I have installed PDFsharp version 1.32.2062 with a nuget package, but I can not find the flatten() method there.

So I created a new test project and imported the dll files for version 1.5 beta. Here I can call the pdfDocument.flatten() method before saving the document, but acrobat reader still asks me to save the changes.

Can you recommend me any diff tool to compare pdf files?


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 16, 2018 6:42 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 986
Location: CCAA
hoebd wrote:
I have installed PDFsharp version 1.32.2062 with a nuget package, but I can not find the flatten() method there.
You cannot expect to find the latest features in a four-year-old NuGet package.
Click "include prerelease" to see the current RC1.


hoebd wrote:
Can you recommend me any diff tool to compare pdf files?
Anything that works for source code files.
Or just open both PDF files with WordPad and compare what you have.
Keep the PDF file small and simple.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 16, 2018 11:11 am 
Offline

Joined: Mon Mar 12, 2018 11:50 pm
Posts: 5
I have created a simple pdf template with one textfield, then I filled this textfield with pdfsharp 1.5 and used the flatten() method before saving it.

Afterwards I opened a copy of the generated document, saved it with acrobat reader and compared it to the original generated document with notepad++.

The results are completely different, as you can see in the attached screenshots.


Attachments:
pdfsharp_compared_part3.png
pdfsharp_compared_part3.png [ 97.33 KiB | Viewed 43490 times ]
pdfsharp_compared_part2.png
pdfsharp_compared_part2.png [ 247.91 KiB | Viewed 43490 times ]
pdfsharp_compared_part1.png
pdfsharp_compared_part1.png [ 234.5 KiB | Viewed 43490 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 19, 2018 12:18 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3110
Location: Cologne, Germany
I use Adobe Reader XI on my computer.
When I open a file marked for "PDF 1.3" or "PDF 1.4" with Adobe Reader and select File => Save As then the new file has the same PDF version as the old one.
I have Adobe Reader, not Adobe Acrobat.

Your file was changed from 1.4 to 1.6 and the 1.6 version used some new optimizations and therefore the files are completely different. This makes the file incompatible with older Reader versions.

It works for me. Sorry it does not work for you.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 20, 2018 2:32 pm 
Offline

Joined: Mon Mar 12, 2018 11:50 pm
Posts: 5
I have noticed that the problem is already in the pdf template. When I open the pdf template with acrobat reader and close it there is already the saving-prompt.
So what I did is to click on yes and saved the template.

When I use this saved template with pdfsharp and generate a document, then the generated document does not have a saving-prompt anymore.
So this problem seemed to be resolved, but when I do it this way, the acroform fields of the generated document does not show the value I set with pdfsharp anymore.

So I googled and found this solution:

Code:
if (pdfDocument.AcroForm != null)
{
    if (pdfDocument.AcroForm.Elements.ContainsKey("/NeedAppearances"))
    {
        pdfDocument.AcroForm.Elements.Add("/NeedAppearances", new PdfBoolean(true));
    }
    else
    {
        pdfDocument.AcroForm.Elements["/NeedAppearances"] = new PdfBoolean(true);
    }
}



With this code the text will be shown in the acroform textfields again, but the the saving-prompt appears again too.

So I think the problem is connected to this parameter. But how can I reach both, no saving-prompt and the correct value in the acroform textfields?


Here you can see my complete test code:

Code:
public void generateTestDocument()
{
    PdfDocument pdfDocument = PdfReader.Open("Template_saved.pdf", PdfDocumentOpenMode.Modify);

    if (pdfDocument != null)
    {
        PdfAcroForm acroForm = pdfDocument.AcroForm;


        if (pdfDocument.AcroForm != null)
        {
            if (pdfDocument.AcroForm.Elements.ContainsKey("/NeedAppearances"))
            {
                pdfDocument.AcroForm.Elements.Add("/NeedAppearances", new PdfBoolean(true));
            }
            else
            {
                pdfDocument.AcroForm.Elements["/NeedAppearances"] = new PdfBoolean(true);
            }
        }


        if (acroForm != null)
        {
            PdfAcroField.PdfAcroFieldCollection fields = acroForm.Fields;
            string[] names = fields.Names;

            for (int i = 0; i < names.Length; i++)
            {
                string fqName = names[i];
                PdfAcroField field = fields[fqName];
                PdfTextField txtField;
                field.ReadOnly = false;

                if ((txtField = field as PdfTextField) != null)
                {
                    string text = "[test]";
                    txtField.Value = new PdfString(text);
                }                       

                field.ReadOnly = true;
            }
        }

        pdfDocument.Flatten();
        pdfDocument.Save("GeneratedDocument.pdf");
    }
}


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 20, 2019 4:18 pm 
Offline

Joined: Wed Mar 20, 2019 4:11 pm
Posts: 1
hoebd wrote:
I have noticed that the problem is already in the pdf template. When I open the pdf template with acrobat reader and close it there is already the saving-prompt.
So what I did is to click on yes and saved the template.

When I use this saved template with pdfsharp and generate a document, then the generated document does not have a saving-prompt anymore.
So this problem seemed to be resolved, but when I do it this way, the acroform fields of the generated document does not show the value I set with pdfsharp anymore.

So I googled and found this solution:

Code:
if (pdfDocument.AcroForm != null)
{
    if (pdfDocument.AcroForm.Elements.ContainsKey("/NeedAppearances"))
    {
        pdfDocument.AcroForm.Elements.Add("/NeedAppearances", new PdfBoolean(true));
    }
    else
    {
        pdfDocument.AcroForm.Elements["/NeedAppearances"] = new PdfBoolean(true);
    }
}



With this code the text will be shown in the acroform textfields again, but the the saving-prompt appears again too.

So I think the problem is connected to this parameter. But how can I reach both, no saving-prompt and the correct value in the acroform textfields?


Here you can see my complete test code:

Code:
public void generateTestDocument()
{
    PdfDocument pdfDocument = PdfReader.Open("Template_saved.pdf", PdfDocumentOpenMode.Modify);

    if (pdfDocument != null)
    {
        PdfAcroForm acroForm = pdfDocument.AcroForm;


        if (pdfDocument.AcroForm != null)
        {
            if (pdfDocument.AcroForm.Elements.ContainsKey("/NeedAppearances"))
            {
                pdfDocument.AcroForm.Elements.Add("/NeedAppearances", new PdfBoolean(true));
            }
            else
            {
                pdfDocument.AcroForm.Elements["/NeedAppearances"] = new PdfBoolean(true);
            }
        }


        if (acroForm != null)
        {
            PdfAcroField.PdfAcroFieldCollection fields = acroForm.Fields;
            string[] names = fields.Names;

            for (int i = 0; i < names.Length; i++)
            {
                string fqName = names[i];
                PdfAcroField field = fields[fqName];
                PdfTextField txtField;
                field.ReadOnly = false;

                if ((txtField = field as PdfTextField) != null)
                {
                    string text = "[test]";
                    txtField.Value = new PdfString(text);
                }                       

                field.ReadOnly = true;
            }
        }

        pdfDocument.Flatten();
        pdfDocument.Save("GeneratedDocument.pdf");
    }
}



Hi!

Did you find a solution for this?
I'm trying to find out whats wrong with my code. I have a template that i fill using PDFSharp (and powershell).

When I use the "AcroForm.Fields" to fill it and then save the file, the text only shows in acrobat programs when I click the field (but if I open the PDF in eg. a browser, the fields are filled).
It works fine if I add "AcroForm.Elements["/NeedAppearances"]" but then Acrobat software promts me to save changes when the new file is opened.

Anybody got an idea whay I get this problem?


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 21, 2019 6:43 pm 
Offline

Joined: Tue Sep 30, 2014 12:29 pm
Posts: 36
Quote:
Anybody got an idea whay I get this problem?

What i THINK what happens:

You have a template containing AcroFields which do not have appearances (at least one of them).
(An appearance describes, how to display the field in the PdfReader)
So when you fill a field, save the document and open it in a PdfReader, the field may appear empty, because there is no information on how to display it.

From the PdfReference about NeedAppearances:
A flag specifying whether to construct appearance streams and appearance dictionaries for all widget annotations in the document

So when you set the flag, a PdfReader will look through all widgets (which AcroFields are) and if it finds, that the widget does not have an appearance, it will create one based on the information in the AcroField dictionaries.
In essence you tell the reader to change the document, which causes the save-prompt.

The solution ?
Create the appearances by yourself.

I also tried that in a forked version of PdfSharp
Have a look at the PdfTextField class and its RenderAppearance method.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 07, 2022 6:23 am 
Offline

Joined: Thu Mar 31, 2022 9:55 pm
Posts: 3
The issue is with the NeedAppreanaces. Basically you are telling Adobe to create an appearance which modifies the PDF and requires saving.

I found the soultion is to use: Install-Package FlattingPDFsharp -Version 1.0.0

Just have to update your usings and make sure you Flatten the PDF:
if (form != null)
reader.Flatten();

worked for me.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jul 23, 2022 6:58 pm 
Offline

Joined: Sat Jul 23, 2022 6:49 pm
Posts: 1
I also have the same problem with Adobe Reader :cry: .

Has anyone managed to solve? With what kind of approach? (es: By manually drawing the Acroform?)

Thanks everyone for the help :) .


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 25, 2022 6:49 pm 
Offline

Joined: Thu Aug 25, 2022 6:41 pm
Posts: 2
I also have the same problem.Has anyone been able to solve this problem?


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 12, 2023 8:18 pm 
Offline

Joined: Fri Sep 08, 2023 5:27 pm
Posts: 12
Sept 2023: I am running into the same issue and could use some help.

I'm comparing Pdfs made using PdfSharp with one made with another company's Pdf tool (we're thinking of switching to PdfSharp) and the problem does not exist with the other Pdf tool. Further, once the opening and closing of the PdfSharp's Pdf (and choosing to save) in Acrobat is done, comparing the 2 PdfSharp files in BeyondCompare (as Pdfs - I'm not looking at a byte for byte comparison), there are small differences: a space is added to one field's data and one other field is slightly altered in it's contents. Notably also, comparing the PdfSharp's Pdf once it's been saved in Acrobat and the other company's Pdf when it's created, they are identical (comparing as Pdfs - not a byte for byte comparison). So something is not getting done when PdfSharp's PdfDocument.Save() completes. Any ideas? Maybe a flag I need to set?

I've tried the things mentioned in this thread and nothing has helped me yet. For instance, the FlattingPDFsharp package is not working for me - it generates an assertion error when Save is called. I think it's pretty a somewhat broken fork.

Thanks for your help
ChrisB


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 15, 2023 5:07 pm 
Offline

Joined: Tue Sep 30, 2014 12:29 pm
Posts: 36
Quote:
comparing as Pdfs - not a byte for byte comparison
What exactly do you mean by that ?
Do you compare visually ?
That will not help much as Acrobat is probably changing something that is not visible. (e.g. some metadata)
Can you attach the before- and after- version of that file ?
(the one you created and the one that was altered by Acrobat)

Quote:
...Pdfs made using PdfSharp...
Do you create the Pdfs from scratch or based on a template ?
Post more details, show some code, maybe someone can help.


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 18, 2023 2:48 pm 
Offline

Joined: Fri Sep 08, 2023 5:27 pm
Posts: 12
Sorry about that! I left some important parts out of my explanation. What I mean about comparing PDFs as PDFs is that BeyondCompare recognizes its dealing with PDFs and will show you differences it finds in the PDF content as English text, like so:

_0_1__S_e__p__2_0_1_9 verses _0_1__S__e_p__2_0_1_9

But it can also show you a byte for byte comparison of files, which in this case shows the differences in the 2 file's compiled state - full of strings of non-ascii chars 1/2 a mile long.

The form I'm "creating" is from a template - not created from scratch.

The PDFs are too large to attach to this forum, plus they are full of confidential info. I'm working on creating a stripped down version with no confidential info and hoping I can at least post screenshots soon. But the "01 Sep 2023" date example I gave above is real - that's a difference BeyondCompare shows as existing between the PDFSharp doc and the other tool's PDF: it considers the underscores between characters to be different tho they display the same 2 underscore characters. Note that its not only a difference in the way PDFSharp is saving the data verses the other PDF tool, but after opening the PDFSharp saved doc in Acrobat & attempting to close it, if I choose to allow it to Save the file when it asked to - tho nothing has been changed - (that's the main issue I'm trying to solve), the PDfs saved state will then match the other file: BeyondCompare finds no differences. Further, if I open the template itself in Acrobat and close it, I'm not prompted to save. So something is not getting set correctly when PDFSharp saves that the other tool and Acrobat are doing. Technically, the template PDF in this area of the form consists of a series of underscores like this: "______________" and then a field that we fill in with a date that essentially sits on top of it.

Here's the C# code I'm using to create, fill & save the PDF from the template using PDFSharp (some code removed for brevity). Thanks for your help:

public string[] RenderWithWatermark(string sourceFileName, string outputFileName, Dictionary<string, string> dict, string watermarkText) {

File.Copy(sourceFileName, outputFileName);
PdfDocument doc = PdfReader.Open(outputFileName, PdfSharp.Pdf.IO.PdfDocumentOpenMode.Modify);
PdfSharp.Pdf.AcroForms.PdfAcroForm acroFormDict = doc.AcroForm;
FileInfo fi = new FileInfo(AppStd.PDFStorageDir outputFileName);

bool bFieldsFound = false;
string _fieldName;
List<string> l_sNotFound = new List<string>();
for (int i = 0; i < acroFormDict.Fields.Count; i++) {
PdfAcroField fld = acroFormDict.Fields[i];
_fieldName = fld.Name;
if (_fieldName.EndsWith("Image") && dict.ContainsKey(_fieldName) && dict[_fieldName].StartsWith("*IMAGE:")) {
/* ...
* code goes here that grabs data and places it in the image fld
*/
bFieldsFound = true;
} else if (dict.ContainsKey(_fieldName)) {
string fldValueToProcess = dict[_fieldName];
fld.Value = new PdfString(fldValueToProcess);
bFieldsFound = true;
} else {
l_sNotFound.Add(_fieldName);
}
}
if (!bFieldsFound) {
acroFormDict.Fields.Elements.Clear();
}
if (!string.IsNullOrEmpty(watermarkText)) {
PdfPage page = doc.Pages[0];
bool bWatermarkOnTop = (AppStd.GetConfigIntWithCache("WATERMARK_ON_TOP", -1) != 0);
PdfSharp.Drawing.XImage waterMarkImage = PdfSharp.Drawing.XImage.FromFile(this._watermarkFile);
XGraphics gfx;
if (bWatermarkOnTop) {
gfx = XGraphics.FromPdfPage(page, XGraphicsPdfPageOptions.Append);
} else {
gfx = XGraphics.FromPdfPage(page, XGraphicsPdfPageOptions.Prepend);
}
gfx.DrawImage(waterMarkImage, 0, 0);
gfx.Dispose();
}

if (doc.AcroForm.Elements.ContainsKey("/NeedAppearances")) {
doc.AcroForm.Elements["/NeedAppearances"] = new PdfBoolean(true);
} else {
doc.AcroForm.Elements.Add("/NeedAppearances", new PdfBoolean(true));
}
if (_formFlatten) {
doc.Flatten();
}

doc.Save(outputFileName);
doc.Close();

return l_sNotFound.ToArray();
}
}


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 18, 2023 5:43 pm 
Offline

Joined: Tue Sep 30, 2014 12:29 pm
Posts: 36
Thanks for showing some code.
Quote:
if (doc.AcroForm.Elements.ContainsKey("/NeedAppearances")) {
doc.AcroForm.Elements["/NeedAppearances"] = new PdfBoolean(true);
} else {
doc.AcroForm.Elements.Add("/NeedAppearances", new PdfBoolean(true));
}
I suspect these lines are the cause for the save-prompt in Acrobat.
See also my comment here: https://forum.pdfsharp.net/viewtopic.php?f=2&t=3741#p12178.

Try removing these lines (or comment them) and check, whether Acrobat still wants so save.

You may have issues with field-content not being rendered correctly but that is a completely different topic...


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 18, 2023 5:52 pm 
Offline

Joined: Fri Sep 08, 2023 5:27 pm
Posts: 12
(void) wrote:
Thanks for showing some code.
Quote:
if (doc.AcroForm.Elements.ContainsKey("/NeedAppearances")) {
doc.AcroForm.Elements["/NeedAppearances"] = new PdfBoolean(true);
} else {
doc.AcroForm.Elements.Add("/NeedAppearances", new PdfBoolean(true));
}
I suspect these lines are the cause for the save-prompt in Acrobat.
See also my comment here: https://forum.pdfsharp.net/viewtopic.php?f=2&t=3741#p12178.

Try removing these lines (or comment them) and check, whether Acrobat still wants so save.

You may have issues with field-content not being rendered correctly but that is a completely different topic...


You are correct - I had already tried removing that & it does remove the problem with the Save prompt in Acrobat. But I'm right back to the "ghosting" issue which I had read the "NeedAppearances" attribute is supposed to fix so I had added it. By ghosting I mean that the data I'm sticking in my fillable fields displays only if you click on the field. I need them to display always.

Perhaps there is a more up-to-date fix for the ghosting issue that I was unable to find? Thanks much for your help!!
Chris


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 23, 2023 12:46 pm 
Offline

Joined: Sat Sep 23, 2023 12:27 pm
Posts: 6
I am having similar issue with PDFSharp (binary version 1.50.4740; latest I can find from NuGet, also tried an earlier version 1.50.xx and issue was the same)

In code I am opening a pdf template file with fields and names known to me.
Document properties in Adobe XI reads
Application: Acrobat PDFMaker 23 for Word
Advanced:
PDF Producer as Adobe PDF Library 23.1.175
PDF Version: 1.6 (Acrobat 7.x)
Tagged PDF: Yes
Fast Web View: No

the c# code opens pdf, sets textfields, assigns NeedAppearances and saves the file.
It then gets emailed to the person.

My issue is not the concern it asks to Save the File, but it does Hide the fields (non consistent, some fields are shown, others hidden until you click the field)
This is particularly an issue in iOS native PDF reader, as well as Adobe app installed from AppStore.

Why the NeedAppearances does not work? I am googling this for two days and cant seem to find an explanation.

My code for reference;

PdfDocument myTemplate = PdfReader.Open(pdfFile, PdfDocumentOpenMode.Modify);
PdfAcroForm pdfform = myTemplate.AcroForm;
if (pdfform.Elements.ContainsKey("/NeedAppearances")){
pdfform.Elements["/NeedAppearances"] = new PdfSharp.Pdf.PdfBoolean(true);
}else{
pdfform.Elements.Add("/NeedAppearances", new PdfSharp.Pdf.PdfBoolean(true));
}

PdfTextField txtEmployerName = (PdfTextField)(pdfform.Fields["Fullname"]);
txtEmployerName.Value = new PdfString(name);
......
...... (other textfield assignments takes place just like above


myTemplate.Save(pdfOutput);

I have even added NeedAppearances code just before I .Save the pdf, and it doesnt make a difference.

I just need the file to show the fields (dont hide it) in common readers, so person receives it in their phone like iPhone with Internal PDF viewer or Adobe App ios reader.

I have tried myTemplate.Flatten(); just before I save,
I have also tried encoding the document with password and setting security rights combinations and result is the same; fields do not show until you click on them OR in the case of flattening the file or restricting it flat out hides all the fields (as if its blank)

PdfSecuritySettings securitySettings = document.SecuritySettings;
securitySettings.PermitAccessibilityExtractContent = false;
securitySettings.PermitAnnotations = true;
securitySettings.PermitAssembleDocument = false;
securitySettings.PermitExtractContent = true;
securitySettings.PermitFormsFill = false;
securitySettings.PermitFullQualityPrint = true;
securitySettings.PermitModifyDocument = false;
securitySettings.PermitPrint = true;


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 23, 2023 5:00 pm 
Offline

Joined: Sat Sep 23, 2023 12:27 pm
Posts: 6
The issue was the Flatten() was not truly flattening the PDF form (i.e. removing the fields).

I have found the solution and shared in the other thread viewtopic.php?f=2&t=4477#p13886

cheers


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 90 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