How to : print a A4 stack to an A4 pdf ??

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

How to : print a A4 stack to an A4 pdf ??

Robert Mann
Question users! Has anybody achieved printing a standard A4 "portrait" stack (595 x 842 pixels) with the "open printing to pdf" command??? If yes.. please share! I can't make it work over here.

I use the following script

on mouseUp
   reset printing
   -- set the printPaperSize to 595,842
   set the printMargins to 0,0,0,0
   -- set the printGutters to 0,0
   open printing to pdf "pdfprintfile.pdf"
   print this card
   -- print this card from 0,0 to 595,842
   close printing
end mouseUp

It works.. but : something like 2 cm at the bottom are just blank, so the whole design layout is messed up.

TO check I printed to pdf from the print menu, and the rendering is just fine.

The commented lines have been tried with no impact on the result.

The following discussion talks about that problem, but seems to imply it only happens only for landscape printing.
open printing to pdf bug

Any clue?? thanks!
Reply | Threaded
Open this post in threaded view
|

Re: How to : print a A4 stack to an A4 pdf ??

JosepM
Hi Robert,

Seems that is a bug both portatrait and landscape modes that cut the bottom.
You can adjust to fit your design setting the scale to 0.85.

Salut,
Josep
Reply | Threaded
Open this post in threaded view
|

Re: How to : print a A4 stack to an A4 pdf ??

J. Landman Gay
In reply to this post by Robert Mann
On 2/1/11 1:18 PM, Robert Mann wrote:
>
> It works.. but : something like 2 cm at the bottom are just blank, so the
> whole design layout is messed up.
>
> TO check I printed to pdf from the print menu, and the rendering is just
> fine.

Some printers can't print beyond a certain position at the top or
bottom. You can get the printrectangle for your printer to see if that's
the case.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to : print a A4 stack to an A4 pdf ??

Robert Mann
The 2 cm blank line at the bottom appears not only on the actual printing but also the screen view preview. So it seems independant from the printer and related to livecode pdf engine.
Reply | Threaded
Open this post in threaded view
|

Re: How to : print a A4 stack to an A4 pdf ??

Robert Mann
I tried to set the printScale to 0.85 and sure that prints the whole story above the bottom blank line.. but.. useless to send the pdf to the printer!!

I tried to expand the stack size so that a 0.85 scale would come back to a strict A4 size.. but that does not help : the 2 cm bottom line is there.

Any other clue? (this is an other occasion to express my zenitude to livecode!-)
Robert
Reply | Threaded
Open this post in threaded view
|

Re: How to : print a A4 stack to an A4 pdf ??

FlexibleLearning.com
In reply to this post by Robert Mann
Hi Robert,

> Question users! Has anybody achieved printing a standard A4 "portrait"
stack
> (595 x 842 pixels) with the "open printing to pdf" command??? If yes..
> please share! I can't make it work over here.

Try this...

on print2pdf
  --| Requires v4.5 and revpdfprinter.dll in the same directory as the
engine...
  put "[Title of document]" into optionArray["Title"]
  put "[Your Name]" into optionArray["Author"]
  put "[Subject of document]" into optionArray["Subject"]
  put "Created by [MyAppName]" into optionArray["Creator"]
  put "LiveCode 4.5 pdf engine" into optionArray["Producer"]
  put "[List of key words]" into optionArray["Keywords"]
  --
  set the itemDel to "/"
  put item 1 to -2 of the effective filename of this
stack&"/pdfprintfile.pdf" into tFilePath
  ask file "Save as..." with tFilePath
  if it="" then exit to top
  put it into tFilePath
  if char -4 to -1 of tFilePath <>".pdf" then put ".pdf" after tFilePath
  --
  reset printing
  set the formatforprinting of this stack to "false"
  set the printPaperSize to the width of this stack,the height of this stack
# e.g. for A4: 595,842
  set the printMargins to 0,0,0,0
  open printing to pdf tFilePath with options optionArray
  print this card
  close printing
  reset printing
end print2pdf

Ensure you leave sufficient unused space on the card for your printer's
minimum margins.

Hugh Senior
FLCo



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to : print a A4 stack to an A4 pdf ??

JosepM
Perfect! works for me...

What is the difference? the reset printing?


Salut,
Josep
Reply | Threaded
Open this post in threaded view
|

Re: How to : print a A4 stack to an A4 pdf ??

Robert Mann
In reply to this post by FlexibleLearning.com
Thanks a lot Hugh. Tried, I thought reset formatPrinting to false could have helped.. but does not do the trick over here (mac os x 10.6.5 - liveCode 450 build 1080) - possible to check what version you tried it on??

[i modified my script And tried yours straight from the box]

I still get a blank space at the bottom as shows here :
Here is the correct pdf printed from the menu titiPrint.pdf
Here is the faulty pdf printed from the script totoPrint.pdf

RObert

Reply | Threaded
Open this post in threaded view
|

Re: How to : print a A4 stack to an A4 pdf ??

Robert Mann
In reply to this post by JosepM
Hi Joseph, could you check which livecode and system version this is running fine for you? thanks.
Reply | Threaded
Open this post in threaded view
|

Re: How to : print a A4 stack to an A4 pdf ??

FlexibleLearning.com
In reply to this post by Robert Mann
Hi Robert,

I just tried Windows XP
- 4.5(1080) with supplied revpdfprinter.dll dated Sep 2010
- 4.5.2(1150) with supplied revpdfprinter.dll dated Dec 2010


I also tried Mac OS X 10.6.6
- 4.5.2(1150) with supplied revpdfprinter.dll dated Dec 2010

All prints are as expected with no 2cm print offset in the output.

Maybe it's a 10.6.5 thing? Someone with 10.6.5 would need to run the script
and see if your results can be replicated.

Hugh Senior
FLCo

-- Original message
Thanks a lot Hugh. Tried, I thought reset formatPrinting to false could have
helped.. but does not do the trick over here (mac os x 10.6.5 - liveCode 450
build 1080) - possible to check what version you tried it on??

[i modified my script And tried yours straight from the box]

I still get a blank space at the bottom as shows here :
Here is the correct pdf printed from the menu
http://runtime-revolution.278305.n4.nabble.com/file/n3253898/titiPrint.pdf
titiPrint.pdf
Here is the faulty pdf printed from the script
http://runtime-revolution.278305.n4.nabble.com/file/n3253898/totoPrint.pdf
totoPrint.pdf

RObert


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to : print a A4 stack to an A4 pdf ??

Robert Mann
Solved!

I upgraded from 4.5.0 to 4.5.3, with livecode 4.5.3 "open printing to pdf" works fine.

The culprit was version 4.5.0 build 1080 on mac os X, though it seemed fine on windows.
Upgrading from mac os x 10.6.5 to 10.6.6 did not change anything.

Thanks everybody for helping drilling this... and i'm real happy this works now!!

(Now i'll see if I can print to pdf from revBrowser!! hum!!)

Robert