Completed
Last Updated: 17 May 2021 08:30 by ADMIN
Release R2 2021
ADMIN
Deyan
Created on: 03 Jul 2017 08:28
Category: PdfProcessing
Type: Feature Request
31
PdfProcessing: Implement API for flattening form fields
This API should provide a method for removing all fields and widgets in the document and draw the default widget appearance in place of the removed widgets.

WORKAROUND: Sample implementation for flattening form fields may be seen in the FlattenFormFields method from the attached demo project.
Attached Files:
10 comments
ADMIN
Dimitar
Posted on: 06 Jul 2020 06:23

Hi Claudio,

This is necessary if you are using a specific font that cannot be found on the operating system, or you are using the .NET standard assemblies. In both cases, the font will be embedded. We do not have an API that allows you to omit the font embedding at this point. We have a feature request for this as well: PdfProcessing: Implement a setting that allows choosing if the fonts should be embedded in the document

Unfortunately, I cannot suggest an alternative solution until the above feature is implemented. 

Thank you for your understanding.

Regards,
Dimitar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Claudio
Posted on: 03 Jul 2020 08:56

Hi Dimitar,

 

The workaround in the first post work only if you embed fonts using FontsRepository.RegisterFont.

I need to NOT embed fonts so i not call RegisterFonts, but when i try to flatten pdf generated in this mode with the workararound code, raise a null reference exception reading the Content property of widget:

((Telerik.Windows.Documents.Fixed.Model.Annotations.VariableContentWidget)widget).Content

there is a patch for this?

Thanks

ADMIN
Dimitar
Posted on: 03 Jul 2020 08:41

Hi Claudio,

Thank you for your feedback. I will forward it to the team.

Is there anything that prevents you from using the workaround in the first post? 

I am looking forward to your reply.

Regards,
Dimitar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Claudio
Posted on: 02 Jul 2020 06:39
this is a very must have feature... is a basic feature
ADMIN
Martin
Posted on: 28 Feb 2020 08:45

Hi Jimmy,

This feature is still not scheduled for implementation as the development team is working on more demanded tasks. I apologize for the inconvenience this missing functionality might be causing you. Until this feature is developed, I would like to suggest you to check the provided in the description of this item approach for working around this missing functionality.

Regards,
Martin
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Jimmy
Posted on: 22 Feb 2020 04:28
it is a surprise that after so many years, this basic feature is still not available where your competitor already has more advance features.
ADMIN
Tanya
Posted on: 30 Jul 2019 12:32
Hi Hector,

The task is not scheduled for implementation during the current release as we are working on more demanded functionalities for the library. Although the flattening is with a high priority in our backlog, at this point I cannot say when it might be available. Please, continue following this item so we can notify you when its status changes.

Regards,
Tanya
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Hector
Posted on: 23 Jul 2019 21:47
Any plans on implementing this into the core application?
ADMIN
Tanya
Posted on: 12 Mar 2019 14:06
Thank you for this update, Hector.

Regards,
Tanya
Progress Telerik
Get quickly and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Hector
Posted on: 07 Mar 2019 16:26

I know this is old, but in the code snippet there was one critical issue. When a textbox has NO data, the FormSource from Content.NormalContentSource will be NULL. Which will cause an issue when you get to FixedContentEditor.DrawForm(). Simple null check will avoid this issue since an empty textbox (with no borders/style) is just blank anyhow.

 

        private static void FlattenWidgetAppearance(FixedContentEditor pageEditor, Widget widget)
        {
            FormSource widgetAppearance = GetWidgetNormalAppearance(widget);

            if (widgetAppearance == null) return;

            pageEditor.Position.Translate(widget.Rect.Left, widget.Rect.Top);
            pageEditor.DrawForm(widgetAppearance, widget.Rect.Width, widget.Rect.Height);
        }