PAL: PDF Automation Language The Team Anshuman Singh Diksha - - PowerPoint PPT Presentation

pal pdf automation language the team anshuman singh
SMART_READER_LITE
LIVE PREVIEW

PAL: PDF Automation Language The Team Anshuman Singh Diksha - - PowerPoint PPT Presentation

PAL: PDF Automation Language The Team Anshuman Singh Diksha Vanvari Vinay Gaba Viral Shah Why does PDF creation require its own programming language? Thats Why! Nuts & Bolts Compiles to Multiple PDF Support for Useful Standard


slide-1
SLIDE 1

PAL: PDF Automation Language

slide-2
SLIDE 2

The Team

slide-3
SLIDE 3

Anshuman Singh Diksha Vanvari Vinay Gaba Viral Shah

slide-4
SLIDE 4

Why does PDF creation require its own programming language?

slide-5
SLIDE 5

That’s Why!

slide-6
SLIDE 6

Nuts & Bolts

slide-7
SLIDE 7

Compiles to Java Useful Standard Library Multiple PDF Operations Support for Map/List

slide-8
SLIDE 8

Objectives

slide-9
SLIDE 9
  • Make it easy to generate pdfs from strings, textfiles, existing pdfs and tables

(charts)

  • Find the right balance between a programming language and a markup

language

  • Provide granular(line level) control to the user
  • At the same time, provide high level constructs in the Standard Library which

take away the pain of writing the pdf at a granular level. ○ Paragraph level - write_paragraph(...) ○ Page level - write_column_layout(...) ○ PDF level - write_pages(...)

slide-10
SLIDE 10

Speak the Language! Woof

slide-11
SLIDE 11

Syntax

#This is a single line comment /* This is a multi line comment */ Comments Loops for(i=0;i<5;i=i+1){ awesome = awesome + 1; } while(i<5){ awesome = awesome * 5; }

slide-12
SLIDE 12

Primitives and Predefined Constructs

intVar:int = 42; stringVar:string = “COMS 4115”; boolVar:boolean = false; floatVar:float = 4.5; General Primitives PDF Primitives and Constructs pdfVar:pdf; pageVar:page; tupleVar:tuple(pdfVar,pageVar); lineVar:line(s,f,sz,x,y,w); imageVar:image(s,h,w,x,y);

slide-13
SLIDE 13

List Data Type

intList : list int; intList += 5; intList -= [0]; intList[0] = 4; List Operations List Type Inference int_l : list int; int_l_l : list list int; int_l_l_l : list list list int; List of ‘int’ -> ‘AA” List of ‘AA’ -> ‘AI’ List of ‘AI’ -> ‘AJ’

slide-14
SLIDE 14

Map Data Type

int_sl_m : map int,list string; m += 5, “PAL”; m -= 5; s : string = m:=4; Map Operations Map Type Inference int_sl_m : map int,list string; List of ‘string’ -> ‘AB’ Map of int,string -> int, ‘AB’

slide-15
SLIDE 15

Primitive Functions

readtext(...) / readtable(...) loadpdf(...) / split(...) drawpiechart(...) / drawbarchart(...) substr(...) / length(...) getpages(...)

slide-16
SLIDE 16

Standard Library

write_paragraph(...) write_two_column_layout(...) write_three_column_layout(...) write_4grid_layout(...) write_pages(...)

slide-17
SLIDE 17

Let’s get our hands dirty, shall we?

slide-18
SLIDE 18
slide-19
SLIDE 19

Hello World!

main(){ pdfVar : pdf; pageVar : page; pageVar = pdfVar . pageVar; tupleVar : tuple(pdfVar,pageVar); lineVar : line ("Hello World!", "TIMES_ROMAN" , 12 , 100, 700, 500); tupleVar = tupleVar . lineVar; renderpdf(pdfVar,”helloworld.pdf”); }
slide-20
SLIDE 20

3 Lines to generate a multi-page PDF

import ("stdlib.pal"); main(){ stringVar:string = readtextfile(filepath); pdfVar:pdf = write_pages(stringVar,14,"TIME_ROMAN","THREE_COLUMN"); renderpdf(pdfVar,"multipages.pdf"); }

slide-21
SLIDE 21

80%*

That’s the amount of lines PAL helps you reduce over Java

* - on average

slide-22
SLIDE 22

Demo Time!