printing to pdf, Strange result on Windows

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2563
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

printing to pdf, Strange result on Windows

Post by jmburnod » Sun Nov 30, 2014 12:27 pm

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

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 928
Joined: Fri Aug 15, 2008 7:15 am

Re: printing to pdf, Strange result on Windows

Post by bangkok » Sun Nov 30, 2014 6:44 pm

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 ?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2563
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: printing to pdf, Strange result on Windows

Post by jmburnod » Sun Nov 30, 2014 7:27 pm

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

Post Reply

Return to “Windows”