<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=PDF</id>
	<title>PDF - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=PDF"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=PDF&amp;action=history"/>
	<updated>2026-04-17T03:30:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=PDF&amp;diff=4984&amp;oldid=prev</id>
		<title>Kenneth: /* Calculations */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=PDF&amp;diff=4984&amp;oldid=prev"/>
		<updated>2018-11-13T22:42:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Calculations&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== PDF ==&lt;br /&gt;
&lt;br /&gt;
== Remove PDF Password ==&lt;br /&gt;
&lt;br /&gt;
[http://www.cyberciti.biz/faq/removing-password-from-pdf-on-linux/ HowTo: Linux Remove a PDF File Password Using Command Line Options]&lt;br /&gt;
&lt;br /&gt;
You can remove the password using various utilities under Linux. Use any one of the following option:&lt;br /&gt;
&lt;br /&gt;
1. pdftk - A handy tool for manipulating PDF file.&lt;br /&gt;
&lt;br /&gt;
2. qpdf - The qpdf program is used to convert one PDF file to another equivalent PDF file.&lt;br /&gt;
&lt;br /&gt;
3. xpdf-utils - Portable Document Format (PDF) suite -- utilities such as pdftops and ps2pdf.&lt;br /&gt;
&lt;br /&gt;
4. Print to a file - Use Evince software itself.&lt;br /&gt;
&lt;br /&gt;
 gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf&lt;br /&gt;
&lt;br /&gt;
== Remove Printing Restrictions ==&lt;br /&gt;
&lt;br /&gt;
 pdf2ps [FILE].pdf out.ps&lt;br /&gt;
 ps2pdf out.ps [FILE2].pdf&lt;br /&gt;
&lt;br /&gt;
 gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf&lt;br /&gt;
&lt;br /&gt;
== Fonts ==&lt;br /&gt;
&lt;br /&gt;
pdffonts command line tool from Xpdf&lt;br /&gt;
&lt;br /&gt;
If you just want to find out the font names: run this from a terminal&lt;br /&gt;
 strings yourPDFfilepath.pdf | grep FontName&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* How to find out which fonts are referenced and which are embedded in a PDF document - Stack Overflow - http://stackoverflow.com/questions/614619/how-to-find-out-which-fonts-are-referenced-and-which-are-embedded-in-a-pdf-docum&lt;br /&gt;
&lt;br /&gt;
=== Fonts in PDF files ===&lt;br /&gt;
&lt;br /&gt;
The PDF file format supports the use of the following font formats:&lt;br /&gt;
&lt;br /&gt;
* TrueType&lt;br /&gt;
* Type 1&lt;br /&gt;
* Type 3&lt;br /&gt;
* Composite fonts (Type 0): both Type 1 (CIDFontType0) and TrueType (CIDFontType2) are supported.&lt;br /&gt;
* OpenType: From PDF 1.6 onwards, OpenType fonts can be stored directly in PDF files. In prior releases OpenType fonts are embedded as either Type 1 or TrueType fonts. The ability to embed OpenType directly was added for the forms capabilities of PDF, it offers no immediate advantage  for prepress users.&lt;br /&gt;
&lt;br /&gt;
By preference any fonts that are used in a layout are also included in the PDF file itself. This makes sure that the file can be viewed and printed as it was created by the designer. There are two mechanisms to include fonts in a PDF:&lt;br /&gt;
&lt;br /&gt;
* Embedding – A full copy of the entire character set of a font is stored in the PDF.&lt;br /&gt;
* Subsetting – Only those characters that are actually used in the lay-out are stored in the PDF. If the “$” character doesn’t appear anywhere in the text, that character is not included in the font. This means that PDF files with subsetted fonts are smaller than PDF files with embedded fonts. For subsetted fonts, the font name is preceded by 6 random characters and a plus sign.&lt;br /&gt;
&lt;br /&gt;
If certain fonts are missing from the PDF file, Adobe Acrobat and Adobe Reader will automatically try to emulate the missing font by using one of the Multiple Master fonts that are built into these programs. This way, the document will not be represented exactly as the designer wanted it to, but at least the text won’t reflow. The Multiple Master fonts that are used for this are:&lt;br /&gt;
&lt;br /&gt;
* Adobe Serif MM&lt;br /&gt;
* Adobe Sans MM&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Fonts that are not necessarily included in PDF files.&amp;#039;&amp;#039;&amp;#039;  Older versions of Adobe Acrobat (Acrobat 3.x and earlier) will never embed the following 14 fonts in a PDF file:&lt;br /&gt;
&lt;br /&gt;
* Courier, Courier-Bold, Courier-Oblique &amp;amp; Courier-BoldOblique&lt;br /&gt;
* Times-Roman , Times-Bold , Times-Italic &amp;amp; Times-BoldItalic&lt;br /&gt;
* Helvetica, Helvetica-Bold, Helvetica-Oblique &amp;amp; Helvetica-BoldOblique&lt;br /&gt;
* Symbol&lt;br /&gt;
* ZapfDingbats.&lt;br /&gt;
&lt;br /&gt;
These fonts, excluding ZapfDingbats, are called the Base 13 fonts.&lt;br /&gt;
&lt;br /&gt;
From Acrobat 4.x onwards, there is no problem embedding the above 14 fonts. In fact it is a good idea to actually always embed these fonts as well. Instead we got another restriction: if the licensing policy of a TrueType forbids the font to be included in a file, Distiller 4 and later will respect this restriction and will not embed the font.&lt;br /&gt;
&lt;br /&gt;
Source: Fonts in PDF files | How to embed or subset a font in a PDF - http://www.prepressure.com/pdf/basics/fonts&lt;br /&gt;
&lt;br /&gt;
=== PDF Core Fonts ===&lt;br /&gt;
&lt;br /&gt;
See [[PDF/Fonts]]&lt;br /&gt;
&lt;br /&gt;
== PDF in Linux ==&lt;br /&gt;
&lt;br /&gt;
See [[Linux/PDF]]&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&lt;br /&gt;
How to do (not so simple) form calculations - https://acrobatusers.com/tutorials/print/how-to-do-not-so-simple-form-calculations&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
JavaScript custom calculation script for a perc... | Adobe Community - https://forums.adobe.com/thread/2287656&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var sum = Number(this.getField(&amp;quot;sum1&amp;quot;).value) + Number(this.getField(&amp;quot;sum2&amp;quot;).value) + Number(this.getField(&amp;quot;sum3&amp;quot;).value) +   &lt;br /&gt;
     Number(this.getField(&amp;quot;sum4&amp;quot;).value) + Number(this.getField(&amp;quot;sum5&amp;quot;).value);  &lt;br /&gt;
event.value = (sum/25)*100; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ((event.value == Infinity)|| isNaN(event.value)) { event.value = &amp;#039;&amp;#039; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make a NaN value invisible? | Adobe Community - https://forums.adobe.com/thread/1071771&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(function () {  &lt;br /&gt;
  &lt;br /&gt;
    // Get the field values, as numbers  &lt;br /&gt;
    var v1 = +getField(&amp;quot;A&amp;quot;).value;  &lt;br /&gt;
    var v2 = +getField(&amp;quot;B&amp;quot;).value;  &lt;br /&gt;
  &lt;br /&gt;
    if (v1 !== 0) {  &lt;br /&gt;
        event.value = 100 * (v1 - v2) / v1;  &lt;br /&gt;
    } else {  &lt;br /&gt;
        event.value = &amp;quot;&amp;quot;;  &lt;br /&gt;
    }  &lt;br /&gt;
  &lt;br /&gt;
})(); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remove NaN error message | Adobe Community - https://forums.adobe.com/thread/834144&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Custom Calculate script&lt;br /&gt;
&lt;br /&gt;
(function () {&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
    // Get the input field values, as strings&lt;br /&gt;
&lt;br /&gt;
    var s1 = getField(&amp;quot;F1&amp;quot;).valueAsString;&lt;br /&gt;
&lt;br /&gt;
    var s2 = getField(&amp;quot;F2&amp;quot;).valueAsString;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
    // Only proceed if there is a value in both fields&lt;br /&gt;
&lt;br /&gt;
    if (s1 &amp;amp;&amp;amp; s2) {&lt;br /&gt;
&lt;br /&gt;
       &lt;br /&gt;
&lt;br /&gt;
        // Convert field values to numbers&lt;br /&gt;
&lt;br /&gt;
        var v1 = +s1;&lt;br /&gt;
&lt;br /&gt;
        var v2 = +s2;&lt;br /&gt;
&lt;br /&gt;
       &lt;br /&gt;
&lt;br /&gt;
        // Perform the division if the denominator is not zero&lt;br /&gt;
&lt;br /&gt;
        if (v2 !== 0) {&lt;br /&gt;
&lt;br /&gt;
            event.value = util.printf(&amp;quot;%.0f&amp;quot;, 100 * v1 / v2);&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
&lt;br /&gt;
            event.value = 0;&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    } else {&lt;br /&gt;
&lt;br /&gt;
       &lt;br /&gt;
&lt;br /&gt;
        // Blank this field if either input is blank&lt;br /&gt;
&lt;br /&gt;
        event.value = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Need Help Creating Custom Calculation Script Pl... | Adobe Community - https://forums.adobe.com/thread/1083829&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>