<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: IDRSolutions</title>
    <description>The latest articles on DEV Community by IDRSolutions (@idrsolutions).</description>
    <link>https://dev.to/idrsolutions</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3078638%2Faa7ba4ef-f446-48e3-95e9-0c43d0c3e214.png</url>
      <title>DEV Community: IDRSolutions</title>
      <link>https://dev.to/idrsolutions</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/idrsolutions"/>
    <language>en</language>
    <item>
      <title>PDF to HTML conversion – matching PDF page size</title>
      <dc:creator>IDRSolutions</dc:creator>
      <pubDate>Fri, 29 May 2026 09:25:47 +0000</pubDate>
      <link>https://dev.to/idrsolutions/pdf-to-html-conversion-matching-pdf-page-size-1po1</link>
      <guid>https://dev.to/idrsolutions/pdf-to-html-conversion-matching-pdf-page-size-1po1</guid>
      <description>&lt;p&gt;A PDF file is designed to be resolution independent – they are defined using resolution-independent units so that the page will always appear the same size whether it is printed or displayed on any device (regardless of the dpi of the output device). So what happens if you use these units when outputting to HTML canvas and CSS?&lt;/p&gt;

&lt;p&gt;It turns out that the page is actually smaller than the PDF page when displayed at 100%. In fact, the HTML page needs the values scaled to 133% to match the size of the PDF file at 100%. Then it all works correctly.&lt;/p&gt;

&lt;p&gt;It is actually the same issue that forces us to correct for DPI between platforms in our PDF viewer. Some computers use 96 dpi, and some use 72 dpi (which is where the value 1.33 comes from, as it is 96 divided by 72). Printers can use values from 72 to pretty much infinity. This matters because if you draw a line which is 96 pixels on a 72 dpi display, it will be 1.3 inches long, but only 1 inch on a 96 dpi display.&lt;/p&gt;

&lt;p&gt;Adobe made the very sensible decision that a PDF page should appear the same on whatever platform you use, so it adjusts the page size to ‘mimic’ 96dpi as the default setting.&lt;/p&gt;

&lt;p&gt;So if you are using HTML, 1.33 is the magical scaling to ensure things appear the same size as they would in PDF when drawn onscreen. If you are using our PDF to HTML converter, the fix is in Friday’s release.&lt;/p&gt;

</description>
      <category>html</category>
      <category>pdf</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Comparing WebP compression algorithms</title>
      <dc:creator>IDRSolutions</dc:creator>
      <pubDate>Thu, 28 May 2026 08:32:19 +0000</pubDate>
      <link>https://dev.to/idrsolutions/comparing-webp-compression-algorithms-494</link>
      <guid>https://dev.to/idrsolutions/comparing-webp-compression-algorithms-494</guid>
      <description>&lt;p&gt;In this article, we will be comparing algorithms to compress webp image. To do this, we will be using our Java image library, JDeli. We will be comparing file size, quality of output, and speed. JDeli is the best pure Java image library for performance and efficiency.&lt;/p&gt;

&lt;p&gt;For the baseline of our comparisons, we will use the following uncompressed image. It has a file size of 180KB. It takes just under 3 seconds to encode.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsya8cn9kawuy49on2vjv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsya8cn9kawuy49on2vjv.png" alt="Kitten PNG" width="300" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What types of compression does WebP support?
&lt;/h2&gt;

&lt;p&gt;Unlike most other image formats, WebP has both a lossless and lossy compression format. Which is best for you all depends…&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Lossy WebP compression?
&lt;/h2&gt;

&lt;p&gt;When you compress WebP images with lossy compression, it is also known as irreversible compression due to the fact that some data is removed.  The process uses the VP8 prediction code commonly used for videos, which includes the algorithm DCT (Discrete cosine transform) to then be able to remove redundant data. &lt;/p&gt;

&lt;p&gt;This does mean webp quality loss is expected but usually not visible. Also, something to bear in mind is that you cannot return to the original quality once you have applied this compression. The advantage is that this compression can reduce WebP size much more effectively.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1agtc0uu69eo46f9hp3m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1agtc0uu69eo46f9hp3m.png" alt="lossy webp" width="300" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using lossy compression reduced the file size to 6KB and took just under 2 seconds, and the quality was set to a default of 75.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Lossless WebP compression?
&lt;/h2&gt;

&lt;p&gt;This compression, unlike lossy, preserves the original data so when decoded can return the file to its original form. To achieve this, multiple transformations are made, including several colour transforms along with a spatial transform and then finished off by applying a form of entropy coding known as LZ77 huffman coding. &lt;/p&gt;

&lt;p&gt;This does then mean that the reduction in file size won’t be as significant, but that is not always the most important aspect when compressing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrzucxh0ige0qffe15es.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrzucxh0ige0qffe15es.png" alt="lossless webp" width="300" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using lossless compression reduced the file size to 67KB and also took just under 2 seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Using our webp compression tool, we can see the lossy far out ranks the lossless compression due to the much smaller file size for similar quality. If you want to reduce webp size, lossy would be your first choice but if you want to be able to return to the original image than the hit of an extra 61KB wouldn’t matter as much especially when they both take the around the same time to complete.&lt;/p&gt;

&lt;p&gt;You can learn more about similar image formats by having a look at our &lt;a href="https://blog.idrsolutions.com/glossary-of-pdf-terms/" rel="noopener noreferrer"&gt;Glossary&lt;/a&gt;. Our Java Image library JDeli has WebP support for you to convert, read and write the image file type. You can have a look at our &lt;a href="https://www.idrsolutions.com/docs/jdeli/webp-support/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; to learn more.&lt;/p&gt;

&lt;p&gt;As experienced Java developers, we help you &lt;a href="https://blog.idrsolutions.com/working-with-images-in-java/" rel="noopener noreferrer"&gt;work with images in Java&lt;/a&gt; and bring over a decade of hands-on experience with many image file formats.&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>Introductory PDF Font Guide</title>
      <dc:creator>IDRSolutions</dc:creator>
      <pubDate>Fri, 22 May 2026 09:32:42 +0000</pubDate>
      <link>https://dev.to/idrsolutions/introductory-pdf-font-guide-31gm</link>
      <guid>https://dev.to/idrsolutions/introductory-pdf-font-guide-31gm</guid>
      <description>&lt;p&gt;PDF fonts is a tricky subject and one we frequently get asked about. So we have a lot of tutorials on the subject. I hope they prove useful, and if you have any specific questions, please send me a question and I will make it into an article.&lt;/p&gt;

&lt;p&gt;So let us start at the beginning….&lt;/p&gt;

&lt;h2&gt;
  
  
  How do fonts work in a PDF file
&lt;/h2&gt;

&lt;p&gt;PDF files can contain images, Vector graphics and text. All the text can be in any font. There are 5 standard font families which all PDF viewers must contain (Times, Helvetica, Courier, Symbol and ZapfDingbats) so these can be used in any document. You can use any other font – my daughter always uses her Malinka font because she loves the letters made from cats. In this case, there are three possible approaches. These are set in the PDF creation tool:-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Just include the name of the font and hope it is on everyone’s machine. If it is not, it will be replaced with a Standard font.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Embed the font. This means include the actual font data inside the PDF. You can then guarantee that it will be on everyone’s machine because it is in the PDF file (but can only be used by the PDF containing it). The problem with this is that some fonts are very large, so it makes the PDF files much bigger.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Embed and subset the font. This means include just the data needed to draw any characters. So if my daughter creates a PDF containing the phrase ‘THE CAT SAT ON THE MAT’, it would embed just the font data for the letters T, H, E, C, A, S, O, N, M. This is a good compromise as it keeps the file small but guarantees the PDF file will appear as you wanted it.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Types of PDF font
&lt;/h2&gt;

&lt;p&gt;What can make things confusing is that PDF files can use several different types of font technology.&lt;/p&gt;

&lt;h3&gt;
  
  
  Type 3
&lt;/h3&gt;

&lt;p&gt;This is the original and simplest font technology. Fonts generally look quite ‘crude’, and you cannot extract the text values.&lt;/p&gt;

&lt;h3&gt;
  
  
  Postscript (Type1)
&lt;/h3&gt;

&lt;p&gt;These types of fonts produce much higher quality output, and you can extract the text values.&lt;/p&gt;

&lt;h3&gt;
  
  
  TrueType
&lt;/h3&gt;

&lt;p&gt;This was created as an alternative to PostScript (for which Adobe owned the patents) by Microsoft and Apple. It also produces high-quality output and enables text extraction. Because it was the default for Windows, there is a much wider selection of fonts, but not all are well-designed.&lt;/p&gt;

&lt;h3&gt;
  
  
  OpenType
&lt;/h3&gt;

&lt;p&gt;This is a ‘merger’ of the best bits from PostScript and TrueType.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;p&gt;You should now have a basic grasp of how PDF fonts work in a PDF file. You might want to &lt;a href="https://blog.idrsolutions.com/understanding-the-pdf-file-format/#fonts" rel="noopener noreferrer"&gt;read&lt;/a&gt; the rest of our tutorials….&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>java</category>
      <category>programming</category>
      <category>font</category>
    </item>
    <item>
      <title>Dynamic XFA/PDF to HTML – resolveNode method</title>
      <dc:creator>IDRSolutions</dc:creator>
      <pubDate>Wed, 20 May 2026 09:52:38 +0000</pubDate>
      <link>https://dev.to/idrsolutions/dynamic-xfapdf-to-html-resolvenode-method-lma</link>
      <guid>https://dev.to/idrsolutions/dynamic-xfapdf-to-html-resolvenode-method-lma</guid>
      <description>&lt;p&gt;Dynamic XFA forms contain JavaScript, which needs some considerable tidying up to convert into content which will run on a Browser.&lt;/p&gt;

&lt;p&gt;In this technical article, our lead developer of FormVu (which converts Acrobat forms into standalone HTML5) gives you an insight into some of the technical issues involved. FormVu is the best tool for filling PDF forms in HTML.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://files.idrsolutions.com/Examples/XFAForms/Purchase_Order_Blank/form.html" rel="noopener noreferrer"&gt;An XFA form with an example of resolveNode&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article I do an overview of some factors that have to be taken into consideration prior to implementing resolveNode subroutine in your code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why resolveNode?
&lt;/h2&gt;

&lt;p&gt;Adobe lifecycle designer follows the Ecma Script 357 specification to represent the SOM model structure.&lt;/p&gt;

&lt;p&gt;In a simple example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;class&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;student&amp;gt;&amp;lt;name&amp;gt;&lt;/span&gt;john&lt;span class="nt"&gt;&amp;lt;/name&amp;gt;&amp;lt;/student&amp;gt;&lt;/span&gt;.

&lt;span class="nt"&gt;&amp;lt;student&amp;gt;&amp;lt;name&amp;gt;&lt;/span&gt;david&lt;span class="nt"&gt;&amp;lt;/name&amp;gt;&amp;lt;/student&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/class&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In case you want to access the name of the second student, then you need to pass the query as “&lt;code&gt;class.student[1].name&lt;/code&gt;” for access&lt;/p&gt;

&lt;p&gt;But such an array-based access algorithm is not available in regular JavaScript; therefore, the resolveNode method is implemented to reference the node information from the ECMAScript 357 supported script.&lt;/p&gt;

&lt;p&gt;The resolveNode method plays a major role in adding, removing, and moving subform instances on the fly:&lt;/p&gt;

&lt;p&gt;A nice HTML implementation example of this functionality can be found in this converted example.&lt;/p&gt;

&lt;p&gt;Have a go at trying to add and delete items from the purchase order form.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps to handle resolveNode function:
&lt;/h2&gt;

&lt;p&gt;The following are steps that simplify the process of handling resolveNode functions.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Write down the short representation of your full XFA form model by removing the internal node structure of fields, so you can track the method insertion point and the caller of the function very quickly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Always use descendant search prior to ascendant search: if you do not find the required item in descendants, then move to the ascendant nodes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use parent-by-parent search while traversing to ascendant nodes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check for [*] symbol: if you come across this sign, try to traverse through all the nodes that have the same named descendants of a particular node.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check for “..” symbol for descendant search and “.parent” for accessing parent node.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As you can see, it can be done, but requires a large amount of pre-processing.&lt;/p&gt;

</description>
      <category>html</category>
      <category>pdf</category>
      <category>web</category>
      <category>programming</category>
    </item>
    <item>
      <title>PDF to HTML5 conversion – Embed an image in HTML5 with Base64 encoding</title>
      <dc:creator>IDRSolutions</dc:creator>
      <pubDate>Fri, 15 May 2026 13:40:13 +0000</pubDate>
      <link>https://dev.to/idrsolutions/pdf-to-html5-conversion-embed-an-image-in-html5-with-base64-encoding-2oki</link>
      <guid>https://dev.to/idrsolutions/pdf-to-html5-conversion-embed-an-image-in-html5-with-base64-encoding-2oki</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;HTML5 can contain links to external images and other resources (which often makes the HTML5 page much faster to load because it is a small text file with links to the images, videos, or audio it needs). This work fine so long as you have network connectivity…&lt;/p&gt;

&lt;h2&gt;
  
  
  Embedding Images with Base64
&lt;/h2&gt;

&lt;p&gt;One of the big new features in HTML5 is the ability for the code to work without a network connection and to store data offline in a cache. Sometimes, however, this functionality is overkill and you can embed an image more simply by just inserting the data into the HTML5 file.&lt;/p&gt;

&lt;p&gt;An image consists of binary data so it needs to be stored in a suitable format inside the text file. Base64 encoding (a simple algorithm which converts bytes into a block of what looks like text data) is ideal (this is what you often use in emails to add in binary content). So instead of the more usual HMTL5 format of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"Im0″ style="&lt;/span&gt;&lt;span class="na"&gt;display:&lt;/span&gt; &lt;span class="na"&gt;none&lt;/span&gt;&lt;span class="err"&gt;;"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"img/1/Im0.png"&lt;/span&gt;
&lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Im0″ width="&lt;/span&gt;&lt;span class="err"&gt;540″&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"720″ /&amp;gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you would see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;base64,iV…Big block of chars here…rDYgg=="
alt="Im0″ width="540″ height="720″ /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to try &lt;a href="https://www.idrsolutions.com/buildvu/" rel="noopener noreferrer"&gt;BuildVu&lt;/a&gt;, there is a new flag to enable it in today’s release (it is commented out by default in ExtractPagesAsHTML.java example).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * embed image inside PDF as base64 encoded stream
 */&lt;/span&gt;
&lt;span class="nc"&gt;HTMLoutput&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setBooleanValue&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HTMLDisplay&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;EmbedImageAsBase64Stream&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Of course once you start playing with images, you may want to have far more control on images and be able to control their exact size.&lt;/p&gt;

</description>
      <category>html</category>
      <category>pdf</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>What is AVIF image format?</title>
      <dc:creator>IDRSolutions</dc:creator>
      <pubDate>Wed, 13 May 2026 09:03:18 +0000</pubDate>
      <link>https://dev.to/idrsolutions/what-is-avif-image-format-46b9</link>
      <guid>https://dev.to/idrsolutions/what-is-avif-image-format-46b9</guid>
      <description>&lt;h2&gt;
  
  
  What is AVIF?
&lt;/h2&gt;

&lt;p&gt;AVIF stands for &lt;strong&gt;AV1 Image File Format&lt;/strong&gt; and is used for storing images and video. It uses the same container format as HEIC images but with potentially better compression. It offers lossy and lossless compression. It offers an alternative to HEIC and JPEG image file formats but is not as well supported in web browsers.&lt;/p&gt;

&lt;p&gt;It is an open standard with no patents.&lt;/p&gt;

&lt;p&gt;The file name extension for this format is: &lt;code&gt;.avif&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here are some other questions about AVIF you might also want to ask. If you have any other questions, please feel free to &lt;a href="https://www.idrsolutions.com/contact-us" rel="noopener noreferrer"&gt;contact us&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is it used for?
&lt;/h2&gt;

&lt;p&gt;The format has many different use cases. It is an optimal choice for web developers using the format for still images, as it provides rich and vibrant images with a smaller size, leading to stable performance and a better user experience, which is why Web developers use AVIF to deliver fast-loading, visually rich websites.&lt;/p&gt;

&lt;p&gt;The format is especially appealing for high-resolution photography, web graphics, icons, and animations due to its superior compression. Tests have shown AVIF files can be 50% smaller than JPEGs at similar quality, and even outperform WebP in many cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Differences compared to HEIC
&lt;/h2&gt;

&lt;p&gt;While both use the HEIF container, AVIF also uses the AV1 compression format. AVIF often delivers better quality at lower file sizes and is an open standard with no patent concerns, making it more appealing for universal and commercial use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is it better than JPEG?
&lt;/h2&gt;

&lt;p&gt;It may produce better compression than JPEG but JPEG is better supported by web browsers and general software. It is possible to convert AVIF to JPG using third-party software like JDeli.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations and Browser Support
&lt;/h2&gt;

&lt;p&gt;While AVIF is gaining significant popularity, particularly for web use, not all browsers and devices support it yet. Chrome, Firefox, and Safari (as of 2024/2025) include AVIF decoding, but some older browsers and operating systems may require fallback formats like JPEG or PNG.&lt;/p&gt;

&lt;p&gt;Software support for editing and conversion is growing but still lags behind legacy image standards.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is it possible to convert AVIF to PNG?
&lt;/h2&gt;

&lt;p&gt;Yes. The reason many people do this is because PNG is a much better supported Image file format. To convert AVIF to PNG you will need to use a third-party software library.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to open AVIF files in Java?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/package-summary.html" rel="noopener noreferrer"&gt;ImageIO&lt;/a&gt; (the built-in Java Image library) does not support AVIF images by default. JDeli lets you &lt;a href="https://blog.idrsolutions.com/how-to-read-avif-files-in-java-tutorial/" rel="noopener noreferrer"&gt;read&lt;/a&gt; and &lt;a href="https://blog.idrsolutions.com/how-to-write-avif-image-files-in-java-tutorial/" rel="noopener noreferrer"&gt;write&lt;/a&gt; Avif images or add AVIF support to ImageIO.&lt;/p&gt;

</description>
      <category>java</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to redact PDF text with the JPedal Viewer</title>
      <dc:creator>IDRSolutions</dc:creator>
      <pubDate>Fri, 08 May 2026 10:49:56 +0000</pubDate>
      <link>https://dev.to/idrsolutions/how-to-redact-pdf-text-with-the-jpedal-viewer-3c8j</link>
      <guid>https://dev.to/idrsolutions/how-to-redact-pdf-text-with-the-jpedal-viewer-3c8j</guid>
      <description>&lt;h2&gt;
  
  
  What is redaction and why should you use it?
&lt;/h2&gt;

&lt;p&gt;Redaction is the process of removing sensitive information from a document so that it is suitable for publishing. It is commonly used in legal or government processes when documents are made available to the public while keeping certain details hidden.&lt;/p&gt;

&lt;p&gt;If you want to publish parts of a document and have certain secrets remain secret, then redaction is the right tool to use.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Redaction in PDFs Works
&lt;/h2&gt;

&lt;p&gt;Redaction typically consists of a black rectangle which covers up the text you want hidden. Traditionally, this was done by drawing over text with a black marker and then scanning it back in.&lt;/p&gt;

&lt;p&gt;In the age of digital media, the concept is the same, but care must be taken to ensure that the content is actually removed and cannot be recovered through some sneaky techniques.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pitfalls of Weak Digital Redaction Tools
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;One common mistake with low-quality redaction tools is drawing a black box over the text, but leaving the text remaining underneath. Other tools may then allow people to remove the boxes and see the text that was there, or you may just see that large characters like j may poke out of top or bottom of the black box.&lt;/li&gt;
&lt;li&gt;Another mistake is replacing the text with empty characters of the same width. This is done to preserve the layout of subsequent characters, however it is possible to reserver engineer what text used to be there by looking at the widths of the blank characters and comparing them with the widths from the font. Ideally, any blank spacing should be accumulated so as not to leak any information.&lt;/li&gt;
&lt;li&gt;Finally, a common pitfall to be aware of is that sometimes you can simply figure out what used to be there based on context e.g. “Jane ■■■” appears in one place, but “Jane Doe” appears nearby.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to redact text using the JPedal Viewer
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://www.idrsolutions.com/jpedal/java-pdf-viewer" rel="noopener noreferrer"&gt;JPedal Viewer&lt;/a&gt; has a tools menu which contains various &lt;a href="https://www.idrsolutions.com/docs/jpedal/tutorials/viewer/manipulate-files-from-the-viewer" rel="noopener noreferrer"&gt;operations you can perform on the currently opened document&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The tools menu is hidden by default, so you will need to enable it by going to edit -&amp;gt; preferences -&amp;gt; menu, and selecting tools.&lt;/p&gt;

&lt;p&gt;Now that the tools menu is visible, you can open a PDF document in the JPedal Viewer, navigate to the desired page, and select redact from the tools menu.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcm3yf9lkboanhyngll46.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcm3yf9lkboanhyngll46.png" alt="JPedal Tools menu" width="612" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This will bring up a dialog box to confirm which page you want to draw over, press OK to confirm.&lt;/p&gt;

&lt;p&gt;You can now drag a rectangle over the area you want to redact. Any text that intersects this rectangle will be removed and a black box will take its place.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F174b44gbggzez78jc3kl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F174b44gbggzez78jc3kl.png" alt="JPedal PDF Redaction" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Download JPedal
&lt;/h2&gt;

&lt;p&gt;You can download a copy of the &lt;a href="https://www.idrsolutions.com/jpedal/your-trial" rel="noopener noreferrer"&gt;JPedal jar&lt;/a&gt; from our website and get started using the &lt;a href="https://www.idrsolutions.com/jpedal/java-pdf-viewer" rel="noopener noreferrer"&gt;JPedal Viewer as a PDF redaction tool&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.idrsolutions.com/docs/jpedal/tutorials/viewer/manipulate-files-from-the-viewer" rel="noopener noreferrer"&gt;How to manipulate PDF files from the JPedal Viewer.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.idrsolutions.com/docs/jpedal/tutorials/viewer/view-pdf-in-java" rel="noopener noreferrer"&gt;Learn more about Viewing PDF files in Java.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.idrsolutions.com/understanding-the-pdf-file-format/" rel="noopener noreferrer"&gt;We can help you better understand the PDF format as developers who have been working with the format for more than 2 decades!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>pdf</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Display Fillable PDF forms in a browser</title>
      <dc:creator>IDRSolutions</dc:creator>
      <pubDate>Wed, 06 May 2026 10:47:11 +0000</pubDate>
      <link>https://dev.to/idrsolutions/how-to-display-fillable-pdf-forms-in-a-browser-3f3e</link>
      <guid>https://dev.to/idrsolutions/how-to-display-fillable-pdf-forms-in-a-browser-3f3e</guid>
      <description>&lt;p&gt;Displaying fillable PDF forms in Chrome (or in any browser) saves a lot of the manual work of filling in forms, scanning them to then digitally present them. By making use of checkboxes, buttons and lists, fillable PDF files simplify this process. It also makes them widely accessible (all you need is a laptop or mobile device) and allows easy submission of the data into systems.&lt;/p&gt;

&lt;p&gt;There are four different ways to display fillable PDF forms in a browser:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Flatten form or display as a flattened form
&lt;/h2&gt;

&lt;p&gt;Our &lt;a href="https://blog.idrsolutions.com/what-is-pdf-form-flattening/" rel="noopener noreferrer"&gt;previous article&lt;/a&gt; explains how PDF form flattening works, including the advantages it has, such as simplifying the PDF. I suggest checking that article out for more information. After the form is flattened, it can be displayed.&lt;/p&gt;

&lt;p&gt;Because the Forms themselves have been turned into images and non-editable text, the downside of this is that the Forms can no longer be edited. So this is a strictly display-only option.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Client software
&lt;/h2&gt;

&lt;p&gt;There is a free PDF viewer (written in JavaScript) called &lt;a href="https://mozilla.github.io/pdf.js/" rel="noopener noreferrer"&gt;PDF.js&lt;/a&gt; that runs in the browser and displays flat PDF files. Recent versions have started adding support for some form features. &lt;/p&gt;

&lt;h2&gt;
  
  
  3. Using Browser-based software
&lt;/h2&gt;

&lt;p&gt;If you are using interactive content, there are software products which provide a browser front end and allow you to display PDF files. Adobe has a very powerful (and expensive) Enterprise solution called Adobe Experience Manager Forms ( previously known as LiveCycle). &lt;a href="https://business.adobe.com/uk/products/experience-manager/forms/aem-forms.html" rel="noopener noreferrer"&gt;Forms Manager&lt;/a&gt; can automatically convert traditional input fields to digital forms, which is a nice additional feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Convert form to HTML5
&lt;/h2&gt;

&lt;p&gt;This is our preferred solution, which we implement with &lt;a href="https://www.idrsolutions.com/formvu/" rel="noopener noreferrer"&gt;FormVu&lt;/a&gt;. FormVu is the best tool for filling PDF forms in HTML.  Browsers display HTML5 content (including interactive form elements). So why not convert the Forms into standalone HTML5 content?&lt;/p&gt;

&lt;p&gt;Which of the 4 ways will best suit you will depend on your exact requirements and budget, but there is a real choice of viable options to get your fillable PDF forms into the browser. It is important to note that these methods work with Microsoft Edge, Chrome and most other browsers.&lt;/p&gt;

&lt;p&gt;You can read our other articles to know what &lt;a href="https://blog.idrsolutions.com/what-are-pdf-forms/" rel="noopener noreferrer"&gt;PDF forms&lt;/a&gt; are and to &lt;a href="https://blog.idrsolutions.com/understanding-the-pdf-file-format/" rel="noopener noreferrer"&gt;understand the PDF file format&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>html</category>
      <category>programming</category>
      <category>pdf</category>
      <category>webdev</category>
    </item>
    <item>
      <title>PDF to HTML conversion – Tradeoffs on adjusting font size</title>
      <dc:creator>IDRSolutions</dc:creator>
      <pubDate>Fri, 01 May 2026 11:20:24 +0000</pubDate>
      <link>https://dev.to/idrsolutions/pdf-to-html-conversion-tradeoffs-on-adjusting-font-size-1hm6</link>
      <guid>https://dev.to/idrsolutions/pdf-to-html-conversion-tradeoffs-on-adjusting-font-size-1hm6</guid>
      <description>&lt;p&gt;When you convert a PDF to HTML, you move from a coding environment where you can work in any floating point size to one where you have to work with int pt sizes. This can cause some issues – if the PDF font size is 8.5pt should we use 8 or 9 in the HTML (8.5 is not allowed and both 8 and 9 are essentially wrong as they will not fit exactly)?&lt;/p&gt;

&lt;p&gt;To improve the positioning of the text in HTML we alter the CharSpacing (moving the characters together or apart) and also see if adjusting the font size would produce a better fit. &lt;/p&gt;

&lt;p&gt;This is especially important when substituting fonts in the HTML – some fonts I have seen are much thinner than the replacement HTML fonts so 9pt in font X is actually more like 18pt in the font we use to display as HTML.&lt;/p&gt;

&lt;p&gt;The drawback with this approach is that it can result in blocks of text with slightly changing font sizes (8,9,8,9,9,8 pt for example). This is more accurate but looks odd. So in our latest release we have added a compromise in the HTML. &lt;/p&gt;

&lt;p&gt;We will ignore small changes in HTML font size (so that line of text will now be 8,8,8,8,8,8 pt) but the 9pt is still changed to 18pt). And we allow the user to adjust the threshold value using the code call&lt;/p&gt;

&lt;p&gt;&lt;code&gt;//only adjust font if change bigger than 5pt&lt;br&gt;
HTMLoutput.setValue(HTMLDisplay.UseFontResizing, 5);&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Altering the value 5 to zero would include any tiny change and 10 would only alter the font size if the change was great than 10 pt. &lt;/p&gt;

&lt;p&gt;5 seems a sensible default and you can experiment with the best compromise for your files in converting PDF to HTML. What value works best for you?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.idrsolutions.com/buildvu/" rel="noopener noreferrer"&gt;BuildVu&lt;/a&gt; is specifically designed for maintaining font integrity when converting PDFs to HTML, so the display document remains a true reproduction of the document.&lt;/p&gt;

</description>
      <category>html</category>
      <category>pdf</category>
      <category>css</category>
    </item>
    <item>
      <title>What is JPEG XL?</title>
      <dc:creator>IDRSolutions</dc:creator>
      <pubDate>Wed, 29 Apr 2026 11:56:04 +0000</pubDate>
      <link>https://dev.to/idrsolutions/what-is-jpeg-xl-30pi</link>
      <guid>https://dev.to/idrsolutions/what-is-jpeg-xl-30pi</guid>
      <description>&lt;h2&gt;
  
  
  What is the JPEG XL image format?
&lt;/h2&gt;

&lt;p&gt;JPEG XL (ISO/IEC 18181) is an open-source file format for raster-graphics that is effective for lossy and lossless compression. It is designed for responsive web environments, to display content across various devices.&lt;/p&gt;

&lt;p&gt;Jyrki Alakuijala, Jon Sneyers and Luca Versari are among notable names that contributed towards the creation of this file format. Its development began in 2017, with the need a for a modern format based on the legacy JPEG format that could progressively render images for a more responsive experience.&lt;/p&gt;

&lt;p&gt;The image format combines Google’s PIK and Cloudbinary’s FUIF technology and the format was standardized in October of 2021, making it one the newer image formats. The forward looking image format has an adaptable framework, which allows for seamless integration of new features and functionalities.&lt;/p&gt;

&lt;p&gt;The filename extension commonly associated with JPEG XL is: &lt;code&gt;.jxl&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What does JPEG XL stand for?
&lt;/h2&gt;

&lt;p&gt;The acronym stands for Joint Photographic Experts Group Extra-Large, an acronym derived from the legacy &lt;a href="https://blog.idrsolutions.com/what-is-jpeg/" rel="noopener noreferrer"&gt;JPEG&lt;/a&gt; format.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are its benefits?
&lt;/h2&gt;

&lt;p&gt;Since it is one of the newer formats, it is more effective in lossless transcoding compared to previous formats such as &lt;a href="https://blog.idrsolutions.com/what-is-webp-image-format/" rel="noopener noreferrer"&gt;WebP&lt;/a&gt; and JPEG. You can convert JPEG images to this format without seeing additional artifacts, not compromising image quality.&lt;/p&gt;

&lt;p&gt;The format enhances user experience by constantly improving image quality with incoming data, something valuable for low-bandwidth scenarios. It provides features such as alpha channel and animated images.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Cases of JPEGXL
&lt;/h2&gt;

&lt;p&gt;Some of the use cases for the image format can include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Serving optimized images on websites to reduce bandwidth and improve load times.&lt;/li&gt;
&lt;li&gt;Archiving and lossless storage of image libraries, including reversible conversion of existing JPEGs to JPEG XL without quality loss.&lt;/li&gt;
&lt;li&gt;Using transparency and animation support for graphics, icons, or UI elements where PNG or GIF is traditionally used.&lt;/li&gt;
&lt;li&gt;High-fidelity photography and creative workflows, especially for images with wide color gamut or high dynamic range (HDR).&lt;/li&gt;
&lt;li&gt;Use in geospatial or scientific imaging tools to read and write large raster images with embedded metadata and color profiles.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also provides progressive decoding which adds more details to images as the data comes in. While the format works well on low bitrates, it performs best at high bitrates where degradation is low.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparing with other formats
&lt;/h2&gt;

&lt;p&gt;When comparing with other formats we observed that this specific format provides higher compression efficiency while also providing support for transcoding older JPEG files effectively, something that many other formats cannot do.&lt;/p&gt;

&lt;p&gt;Older codecs like JPEG use YCbCr colour space for chroma subsampling, which was originally designed for analogue televisions. JPEG XL, however, uses an LMS based colour space called XYB.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does Java support JPEG XL?
&lt;/h2&gt;

&lt;p&gt;You can &lt;a href="https://blog.idrsolutions.com/how-to-read-jpeg-xl-images-in-java/" rel="noopener noreferrer"&gt;read&lt;/a&gt; JPEG XL images in Java with JDeli. &lt;a href="https://www.idrsolutions.com/jdeli/" rel="noopener noreferrer"&gt;JDeli&lt;/a&gt; is the best pure Java image library for image manipulation.&lt;/p&gt;

&lt;p&gt;If you would like to learn more about JPEG XL support, we have a repository of other such common image format in our &lt;a href="https://blog.idrsolutions.com/glossary-of-pdf-terms/" rel="noopener noreferrer"&gt;glossary&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As experienced Java developers, we help you &lt;a href="https://blog.idrsolutions.com/working-with-images-in-java/" rel="noopener noreferrer"&gt;work with images in Java&lt;/a&gt; and bring over a decade of hands-on experience with many image file formats.&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Why choose a pure Java PDF library?</title>
      <dc:creator>IDRSolutions</dc:creator>
      <pubDate>Fri, 24 Apr 2026 13:31:02 +0000</pubDate>
      <link>https://dev.to/idrsolutions/why-choose-a-pure-java-pdf-library-2ngb</link>
      <guid>https://dev.to/idrsolutions/why-choose-a-pure-java-pdf-library-2ngb</guid>
      <description>&lt;h2&gt;
  
  
  What are the benefits of a pure Java PDF library and why does it matter?
&lt;/h2&gt;

&lt;p&gt;PDF processing sits at the core of many enterprise systems, and the Java PDF library you choose to build your system has significant implications.&lt;br&gt;
If you are building a new system, then here is why you should choose a pure Java PDF library.&lt;/p&gt;

&lt;p&gt;Whether you are selecting a PDF generation library in Java, for high-volume document creation, evaluating a Java PDF editor library for annotation workflows or integrating a Java PDF API into an existing microservice, the pure Java constraint narrows the field considerably, and for good reason.&lt;/p&gt;

&lt;h2&gt;
  
  
  Write once, run anywhere
&lt;/h2&gt;

&lt;p&gt;Java’s slogan “write once, run anywhere” is particularly valuable in PDF processing. A pure Java library runs on any platform/operating system, which removes the need for recompilation or platform-specific code. &lt;/p&gt;

&lt;p&gt;You can deploy the same code that you wrote on your MacBook to a Linux or Windows server. This effectively removes any concerns for environment-specific bugs or cross-platform issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Simplified distribution and deployment
&lt;/h2&gt;

&lt;p&gt;With a pure Java solution, the burden of managing different native binaries compiled for different architectures does not exist. You no longer need to maintain multiple builds for x86 or ARM. &lt;/p&gt;

&lt;p&gt;This makes distribution much simpler, especially if you are shipping to end users. If deploying to the cloud, then you only need to create a single container image.&lt;/p&gt;

&lt;h2&gt;
  
  
  Improved security and stability
&lt;/h2&gt;

&lt;p&gt;Security is a critical concern in PDF processing. The PDF file format is very complex and has been a frequent target for vulnerabilities and exploits. This is especially common in native libraries written in low-level code. (See this &lt;a href="https://en.wikipedia.org/wiki/FORCEDENTRY" rel="noopener noreferrer"&gt;scary example&lt;/a&gt;!). &lt;/p&gt;

&lt;p&gt;Running code entirely within the JVM introduces a strong safety layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Memory management is handled automatically by the garbage collection, reducing risks like buffer overflow exploits&lt;/li&gt;
&lt;li&gt;There is no direct memory access, which removes the risk of segmentation faults or other similar memory corruption errors&lt;/li&gt;
&lt;li&gt;Java’s security model ensures that execution is isolated and controlled&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Easier debugging and maintenance
&lt;/h2&gt;

&lt;p&gt;Java has a very mature ecosystem of development tools, including debuggers, profilers and refactoring utilities, which are widely available and well integrated into modern IDEs. This has several benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identify and resolve issues faster&lt;/li&gt;
&lt;li&gt;Easier to maintain codebase&lt;/li&gt;
&lt;li&gt;More efficient refactoring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In contrast, debugging native code involves more complex tooling and can pose some platform-specific challenges.&lt;/p&gt;

&lt;h2&gt;
  
  
  Simpler licensing
&lt;/h2&gt;

&lt;p&gt;When a library has no external dependencies, it makes the licensing very straightforward. This can reduce the legal complexity of procurement and lower the risk of compliance issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, choosing a pure Java PDF library can be a strategic decision. By leveraging Java’s portability, security and ecosystem, enterprises can create large systems with much less technical debt in the long term. In the intricate field of PDF processing, this reduced complexity pays dividends across the entire software lifecycle.&lt;/p&gt;

&lt;p&gt;The table below outlines the differences between a pure Java PDF SDK and one that was written using native code and Java:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fic29oous4myt3vq36bts.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fic29oous4myt3vq36bts.png" alt="Pure Java vs Native code" width="800" height="703"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Looking for a pure Java PDF library to handle processing your documents? Check out JPedal.&lt;/li&gt;
&lt;li&gt;Want to learn more about the PDF file format? We have been developing PDF software for over 20 years!&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>pdf</category>
    </item>
    <item>
      <title>Can you extract flattened form data from a PDF file?</title>
      <dc:creator>IDRSolutions</dc:creator>
      <pubDate>Wed, 22 Apr 2026 09:15:05 +0000</pubDate>
      <link>https://dev.to/idrsolutions/can-you-extract-flattened-form-data-from-a-pdf-file-1j89</link>
      <guid>https://dev.to/idrsolutions/can-you-extract-flattened-form-data-from-a-pdf-file-1j89</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Like many of my best articles, this posting was inspired by a customer question. We try to answer all questions and often use a blog post to provide a more detailed reply if it is a useful general topic.&lt;/p&gt;

&lt;p&gt;The question related to extracting form data from a PDF file. The PDF file format stores interactive form data apart from the general page data in a set of separate objects. So it is very easy to extract from the PDF file. However, it is possible to ‘flatten the forms’. I explained this in more detail in a previous post, &lt;a href="https://blog.idrsolutions.com/what-is-pdf-form-flattening/" rel="noopener noreferrer"&gt;“What is form flattening”&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Challenge of Flattened Forms
&lt;/h2&gt;

&lt;p&gt;Once this has been done, the forms no longer exist, they are text or shapes inside the stream of commands used to draw the PDF and you cannot interact with them. So is it possible to still extract the data???&lt;/p&gt;

&lt;p&gt;The problem is that there is no single defined way to flatten Form data into a PDF file. The data can be stored in the PDF in several possible ways:-&lt;/p&gt;

&lt;h2&gt;
  
  
  Possible Ways Flattened Data Can Be Stored
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;As ordinary text (especially for Form objects which show text data such as comboBoxes, Lists, and Text fields).&lt;/li&gt;
&lt;li&gt;As a special embedded character (especially for radio buttons or checked boxes where you can define one character as a ticked box and one character as a blank box).&lt;/li&gt;
&lt;li&gt;As a combination of a text character as a blank box and then the checks or ticks drawn on top for checked boxes.&lt;/li&gt;
&lt;li&gt;Purely as a set of draw commands.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;1 and 4 are probably too complex to enable easy extraction.&lt;/p&gt;

&lt;p&gt;You could reconstruct the form data for 2 and 3 for radio buttons or check boxes as follows:-&lt;/p&gt;

&lt;h2&gt;
  
  
  Blank box drawn over
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Identify all the blank boxes. This will give you the locations of all the boxes.&lt;/li&gt;
&lt;li&gt;See if XForm coordinate falls inside the box (ie its checked). This will give you the status.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So it is a non-trivial task, and it may vary from file to file but it is possible. But if you have access to the original non-flattened PDF files. It is a lot easier.&lt;/p&gt;

&lt;p&gt;We have over 2 decades of experience in the industry and can help you &lt;a href="https://blog.idrsolutions.com/understanding-the-pdf-file-format/" rel="noopener noreferrer"&gt;better understand the PDF file format&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>java</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
