Merge pull request #26 from gavinmcc/fix-ppv

Fix ppv
This commit is contained in:
Evan Widloski 2021-03-21 22:46:30 -05:00 committed by GitHub
commit 47539d4d91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

13
main.go
View file

@ -37,6 +37,11 @@ const METADATA_TEMPLATE = `{
}
`
const CONTENT_TEMPLATE = `{
"fileType": "pdf"
}
`
func main() {
@ -171,5 +176,13 @@ func handleRequest(conn net.Conn) {
f.WriteString(fmt.Sprintf(METADATA_TEMPLATE, time.Now().Unix(), title))
f.Close()
// ----- Create .content -----
cont_path := XOCHITL_DIR + u.String() + ".content"
fmt.Println("Saving content file to", cont_path)
f, err = os.Create(cont_path)
f.WriteString(fmt.Sprintf(CONTENT_TEMPLATE))
f.Close()
conn.Close()
}

View file

@ -40,7 +40,7 @@
*JCLToPDFInterpreter: "@PJL ENTER LANGUAGE = PDF<0A>"
*JCLEnd: "<1B>%-12345X@PJL EOJ <0A><1B>%-12345X"
*cupsFilter: "application/vnd.cups-pdf 0 -"
*cupsFilter2: "application/pdf application/vnd.cups-pdf 0 pdftopdf"
*cupsFilter2: "application/pdf application/vnd.cups-pdf 0 -"
*OpenGroup: General/General
*JCLOpenUI *PageSize/Page Size: PickOne