For awhile now we have been adding forms functionality to the pdf to svg extractor so the forms found on the pdf page will appear and function as they do in original pdf.
As those of you may know svg has support for text areas that can be set to be editable. So in order to add the full functionality we require for extracted pdf pages we needed to find some other way to have the forms appear on page with the required functionality.
There are some disadvantages to using foreign objects, some browsers do not support foreign objects as well as others. For instance, at the time of writing, Opera would display the forms when they are first loaded then after that they are replaced with markers showing an issue with the content in the area of the form components. Foreign objects also allow you to place foreign objects outside of the area defined by the svg object. These objects will appear but only under unique circumstances. This can be an issue as we centre the svg image using the style attribute. The svg image may be centered but the foreign objects within the svg object are not.
This post is part of our “SVG Article Index” in these articles, we aim to help you build knowledge and understand SVG.
Latest posts by Kieran France (see all)
- Our Goals for the JPedal Java PDF Library SDK in 2017 - December 16, 2016
- Annotations in PDF Files, what are they and why use them? - July 27, 2016
- What is XMP metadata and why it is useful - June 7, 2016
- Improving our JUnit tests - August 6, 2015
- Improving Our Java PDF Printing Examples - July 14, 2015