mirror of
https://github.com/Evidlo/remarkable_printer.git
synced 2024-10-20 03:27:37 -04:00
commit
47539d4d91
13
main.go
13
main.go
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue