The following is a short shell script which I hacked together based on the PDF Reference V1.7 which seems to do the job across a wide spectrum of PDF document types.
Note this shell script is written for ksh93, not pdksh or ksh88. It can easily be ported to other shells but that I will leave as an exercise to the reader.
This is a simple example of a shell script. I made it because it's sometimes convenient to search through a manpage and to have access to the terminal while you're reading (maybe to test code).
It also serves as a basic example for anyone learning shell scripting.
#!/bin/sh
nm="/tmp/$1.pdf"... (0 Replies)
Hi,
I am trying to convert html to pdf using perl module PDF::FromHTML, am getting the error as given below.
not well-formed (invalid token) at line 2, column 17, byte 56 at C:/Perl/lib/XML/Parser.pm line 187 at C:/Perl/site/lib/PDF/FromHTML.pm line 140
The perl code is as given... (2 Replies)
I have some code in fortran90, example stored in scode.f90 and I want to create a pdf containing the code. I would like to have four pages of code put into each page in the pdf. I was thinking of creating a ps file using mpage and then using ps2pdf after. However, I noticed that ps2pdf shift the... (4 Replies)
I have a file like below . The good pages must have 3 conditions :
The pages that containing page total only must have 50 lines.
The pages that containing customer total only must have 53 lines.
The last page of Customer Total should be the last page.
How can I accomplish separating good... (1 Reply)
Hello,
I have a few thousand .pdf files in various folders each have a naming scheme like this:
006_-_Titled_Document_#34_-_September-25-2011-side-1.pdf
In each folder, the number system starts at 001 (as you see on the far left of the file name), and then ends at 999 (maximum .pdf files).... (4 Replies)
Hello,
Some googling and checking the man pages told me it should be possible to split a pdf (or ps) file into individual pages :
man gs
You might want to print each page separately. To do this, send the
output to a series of files "foo1.xyz, foo2.xyz, ..." using the "-sOut-... (3 Replies)
In here we have a script to extract all pdf links from a single page.. any idea's in how make this read instead of a page a list of pages.. and extract all pdf links ?
#!/bin/bash
# NAME: pdflinkextractor
# AUTHOR: Glutanimate (http://askubuntu.com/users/81372/), 2013
#... (1 Reply)
Does anybody have idea of Converting secured pdf files to pdf using acroread ?
---------- Post updated at 04:49 PM ---------- Previous update was at 04:44 PM ----------
This file is not password protected. (4 Replies)
So I've worked how to add page numbers based on regex. It's using the footer text.
How do we get the total amount added so we have page number with the total number of pages?
Desired output: Page No:1 of 5
Thanks in advance. (15 Replies)
Discussion started by: tugar
15 Replies
LEARN ABOUT SUNOS
ptob
ptob(9F) Kernel Functions for Drivers ptob(9F)NAME
ptob - convert size in pages to size in bytes
SYNOPSIS
#include <sys/ddi.h>
unsigned long ptob(unsigned long numpages);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
PARAMETERS
numpages Size in number of pages to convert to size in bytes.
DESCRIPTION
This function returns the number of bytes that are contained in the specified number of pages. For example, if the page size is 2048, then
ptob(2) returns 4096. ptob(0) returns 0.
RETURN VALUES
The return value is always the number of bytes in the specified number of pages. There are no invalid input values, and no checking will be
performed for overflow in the case of a page count whose corresponding byte count cannot be represented by an unsigned long. Rather, the
higher order bits will be ignored.
CONTEXT
ptob() can be called from user or interrupt context.
SEE ALSO btop(9F), btopr(9F), ddi_ptob(9F)
Writing Device Drivers
SunOS 5.10 11 Apr 1991 ptob(9F)