PDA

View Full Version : pdf


max77
11-14-2005, 04:13 AM
hi!!
i wrote a very easy macro to print a selected part on a pdf file.
but now I'd like to set up automatically the name's file.
How is it possible?
I' ve found in this forum an old macro that seemed to solve this situation, but it doesn't work on my pc.
Can someone help me please?

andrea
11-14-2005, 07:30 AM
I use this macro in order to create the name of the file pdf based on the name of the file:

DEFINE nome_pdf
LOCAL Stringa
LOCAL Lung
LOCAL Cont
LOCAL Char
LOCAL Nome_file_pdf
LOCAL dir_tmp

LET dir_tmp 'c:\tmp\'
INQ_ENV 0
LET Stringa (INQ 304)
LET Lung (LEN Stringa)
LET Cont 0

LOOP
LET Char (SUBSTR Stringa (Lung - Cont) 1)
LET Cont (Cont+1)
EXIT_IF (Char='\')
END_LOOP

LET Stringa (SUBSTR Stringa (Lung - Cont+2) Lung)
LET Lung (LEN Stringa)
LET Pos (POS Stringa '.mi')
LET Stringa (SUBSTR Stringa 1 (Pos -1))
LET Nome_file_pdf (dir_tmp+Stringa+'.pdf')
Set_sys_plot_filename_prefix nome_file_pdf
DISPLAY ('File salvato in :'+Nome_file_pdf)
END_DEFINE

max77
11-14-2005, 10:53 PM
Thank you andrea!

I've already used "Set_sys_plot_filename_prefix nome_file_pdf " but then my pdf printer (I have acrobat professional 7.0 installed) save the file as a .prn and not like .pdf type.
don't know the reason.
I tried again with this small macro that i attach here.
does it depend on the kind of pdf printer installed?
massimo

andrea
11-14-2005, 11:13 PM
Also from me if I create the rows with plotter_type 'Adobe PDF' give error to me.
I use to its place the drive installed from CoCreate with me10
PLOTTER_TYPE 'PDF_GENERIC'

It tries.....
Andrea

max77
11-15-2005, 05:25 AM
thank you!
but i'm using an old version of me10 (v11.6) and i don't have the generic pdf printer.
what do you thik if i print a pnr file and then using run i call the acrodist.exe to translate the pnr in the pdf file?
do you have better ideas?
thank you

MichaelA
02-07-2006, 06:32 AM
Have either of you been successful in getting your macro to work? I'm interested in doing a similar function, while saving a .mi file in v11.6 I also want to save a PDF file at the same time. I have some of the info but not enough to make it all work. Can you post your macro to share? Like you I have Adobe PDF. Thks