showing comments after merge

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v11)  /  Re: showing comments after merge

DynamicPDF CoreSuite for .NET (v11) Forum

 Jun 06 2023 2:54 PM
I am creating a merge document from 1 or more existing .pdf files to use to stamp the header and footer information of a final document.  This currently works fine.

Recently, one of the intermediated document's creators began adding comments as a means of revising the document.  Now, when I merge, those comments are not visible on my final merged document.

I have tried using the following:

                MergeDocument document = new MergeDocument();

                var pdfDocumentWithAllFields = new PdfDocument(sInputFile);

                MergeDocument doc = new MergeDocument(pdfDocumentWithAllFields, MergeOptions.All);
                byte[] pdfData = doc.Draw();
                PdfDocument pdfDocWithNoFields = new PdfDocument(pdfData);

                importPDF(pdfDocumentWithAllFields, pdfDocWithNoFields, document);

                stampPage(document, 0);
                stampFooter00(document, 0);
                stampFooter0(document, 0);
                stampHeader0(document, 0);
                stampId(document, 0);

                for (int x = 1; x < document.Pages.Count; x++)
                {
                    stampPage(document, x);
                    stampFooter(document, x);
                    stampHeader(document, x);
                    stampId(document, x);
                }

                //Mark doc as resized
                CustomPropertyList list = document.CustomProperties;
                list.Add("isResized", "true");

                document.Draw(sOutputFile);

Since the number of pages and comments in the documents vary, am I able to have some kind of flag that says "make comments visible" or do I have to find each comment individually?

Thank you for your time and consideration.
 Jun 07 2023 10:19 AM
Posted by a ceTe Software moderator
Hi,

DynamicPDF Core Suite for .NET merges the source PDFs as is. If you see any contents missing in the merged output PDF, then please send the following information to support@dynamicpdf.com so we can look into it further.

1. Code sample which uses static data to recreate the behavior.
2. Output PDF. Specify what contents are missing and on what page.
3. Source PDFs used for merging.
4. Exact version and build number of the DynamicPDF Core Suite DLL file used in your application.

You can either completely remove comments or preserver all in the output PDF. There is no option to hide or show specific comments.

Thanks,
ceTe Software Support Team
 Jun 08 2023 5:33 PM
Following support email, I merged the importedPage and not importedPageData or importedPageContent and it works as expected.  However, I need to scale the imported page to fit with the customer stamping that needs to be done.  importedPageArea was suggested but seems to behave like data and content.  Is there a way to move and scale an imported page and keep the comments intact?
 Jun 08 2023 5:48 PM
Follow up - and if I can't scale an imported page, is there a way to draw a "flattened" document and then import that document?
 Jun 09 2023 9:47 AM
Posted by a ceTe Software moderator
Hi,

ImportedPageArea also will not preserve the annotations (notes) in the output PDF.

ImportedPage will retain the annotation(notes) in the output PDF, but it is not possible to scale the page. You can set the page dimension and change the size of the page, but this may crop the contents.

Flattening the PDF will not help in preserving the annotation in the ImportedPageArea, ImportedPageData or ImportedPageContents. This will only flatten form field data.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 11:21 AM.