Page 1 of 1

printing to pdf, Strange result on Windows

Posted: Sun Nov 30, 2014 12:27 pm
by jmburnod
Hi All,
I have a standalone that export a pdf file with the "printing to pdf" command (20 pages).
It works fine on OSX, the filesize = 2.4 Mo
Windows (XP) can't find software to open it, the filesize = 42 Mo
Is there an explanation about it ?
Thanks again for your lights
Jean-Marc

Re: printing to pdf, Strange result on Windows

Posted: Sun Nov 30, 2014 6:44 pm
by bangkok
Could you post the entire script that you use to create the PDF file ?

Do you get the same result inside the LiveCode IDE, or only with the standalone ?

Re: printing to pdf, Strange result on Windows

Posted: Sun Nov 30, 2014 7:27 pm
by jmburnod
Hi,
Do you get the same result inside the LiveCode IDE, or only with the standalone ?
Yes on OSX, 2.4 Mo in IDE and standalone
No on Windows, 15 Mo in IDE, 42 Mo in Standalone :shock:

Here is the script

Code: Select all

on doPrintDocEEP
   put empty into fld "fPathDocumentsFolder"
   set the vscroll of group "grPresentation" to 0
   lock screen
   hide grc "Cadreprint"
   set the vscroll of group "grPresentation" to 0
   set the printmargins to "18,18,18,18" 
   set the printPaperOrientation to "landscape"
   set the printRowsFirst to "true"
   set the printCardBorders to "false"
   set the printGutters to "18,18"
   set the printScale to 0.8
   put "EcrireEnPicto_documentation.pdf" into tNameFile
   put specialfolderPath("documents") & "/" & tNameFile into tPath
   open printing to pdf tPath 
   repeat for each line tScroll in the uMyPageToScrollV of group "grPresentation"
      set the vscroll of group "grPresentation" to tScroll
      print this card from the topleft of grc "CadrePrint"  to the bottomRight of grc "CadrePrint"
      wait 100 milliseconds
   end repeat
   close printing
   reset printing
   set the vscroll of group "grPresentation" to 0
   doDialExportFin    "Cette pésentation été exportée dans le  fichier",tPath
   put specialfolderPath("documents") into fld "fPathDocumentsFolder"
   show grc "Cadreprint"
end doPrintDocEEP

on doDialExportFin pDebMes,pPathEx
   answer pDebMes && pPathEx with "Afficher" or "Continuer"
   if it = "Afficher" then
      launch document pPathEx
      if the result <> empty then
         answer "Le programme ne parvient pas à ouvrir le document"
           exit to top
      end if
   end if
end doDialExportFin