Startseite › Foren › Deutsches LiveCode-Forum › PDF unter Windows erstellen …. Speichert nicht
Schlagwörter: pdf, PDF erstellen, Speichern
- Dieses Thema hat 4 Antworten und 3 Teilnehmer, und wurde zuletzt aktualisiert vor 4 Jahren, 5 Monaten von
Klaus Major.
-
AutorBeiträge
-
-
Oktober 6, 2020 um 07:27 Uhr #23391
Hallo Gemeinde,
ich habe in kleines ….. (besch… ) Problem.
Leider speichert mir LC die PDF nicht. Den Ordner den legt mir LC an aber es wird darin nichts abgespeichert. Am MAC geht es.
hat da jemand Ahnung was da Falsch läuft?
on mouseUp pMouseButton put the abbreviated date into tFile set the itemdel to "," put item 1 of tFile into ttFile put item 2 of tFile after ttFile put item 3 of tFile after ttFile put "-"& the text of fld"fldUhrzeit" after ttFile put specialFolderPath("documents") & "/Berichte" into tVolder if there is not a folder tVolder then create folder tVolder end if put specialFolderPath("documents") & "/Berichte/Vorfall vom "& ttFile &".pdf" into tPDFPath set the printPaperSize to "595,842" set the visible of group grbButtons to false set the visible of btn"back" of card"BerichtBild" to false focus on nothing -- open printing to pdf tPDFPath if the result is "Cancel" then ## The user has cancelled printing exit mouseUp else ## Print the card into the printable area print card "Bericht" of this stack into 0,0,595,842 print break print card "BerichtBild" of this stack into 0,0,595,842 end if close printing -- answer information "PDF erfolgreich unter -- "&tPDFPath&" -- gespeichert" launch document tPDFPath set the neu of stack"MainDruckStack" to 0 close this stack end mouseUp
LG Immanuel
-
Oktober 6, 2020 um 15:33 Uhr #23411
Hm, auch hier nach jedem PRINT mal THE RESULT checken:
... open printing to pdf tPDFPath if the result is "Cancel" then ## The user has cancelled printing exit mouseUp else ## Print the card into the printable area print card "Bericht" of this stack into 0,0,595,842 if the result <> EMPTY then answer the result end if print break print card "BerichtBild" of this stack into 0,0,595,842 if the result <> EMPTY then answer the result end if end if ...
Gibt vielleicht Auskunft, was los sein könnte.
-
Oktober 6, 2020 um 15:42 Uhr #23413
Hi Immanuel,
ich habe es gerade mal unter Windows und Mac ausprobiert. Der Code läuft, aber ich vermute stark, dass in fld“fldUhrzeit“ ein Wert in der Form 14:30 steht. Das bedeutet, dass im Namen der Datei aber auch ein Doppelpunkt auftaucht und das findet Windows nicht lustig, sondern kürzt den Namen der Datei ab dort ab.
Vorschlag: ersetze den Doppelpunkt durch ein „-“ oder mach 1430 draus, dann klappt es.
Happy Coding
Torsten -
Oktober 6, 2020 um 16:47 Uhr #23415
Hallo Torsten, genau das mit dem Doppelpunkt war es. Oh man dieses Windof … ich bin halt Mac verwöhnt 😉 ich dachte dass Windows das nach so langer Zeit auch mal hinbekommt. Naja danke für den Tip.
LG Immanuel
-
Oktober 6, 2020 um 17:24 Uhr #23416
Oh man dieses Windof … ich bin halt Mac verwöhnt ?
Willkommen im Club! 😀
-
-
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.