PDF unter Windows erstellen …. Speichert nicht

Startseite Foren Deutsches LiveCode-Forum PDF unter Windows erstellen …. Speichert nicht

Schlagwörter: , ,

Ansicht von 4 Antwort-Themen
  • Autor
    Beiträge
    • #23391
      foto2004
      Teilnehmer

        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

      • #23411
        Klaus Major
        Administrator

          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.

        • #23413
          Torsten
          Teilnehmer

            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

          • #23415
            foto2004
            Teilnehmer

              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

            • #23416
              Klaus Major
              Administrator

                Oh man dieses Windof … ich bin halt Mac verwöhnt ?

                Willkommen im Club! 😀

            Ansicht von 4 Antwort-Themen
            • Du musst angemeldet sein, um auf dieses Thema antworten zu können.