05-29-2009 01:37 PM
I have been trying to specify a specific page size for a PDF. I have figured out how to use the picratio and other variables to change the TDR within DD. However, the PDFexport ignores the printwidth setting and always uses 8.5x11.
I was able to manually change the page size by printing to the "diadem pdf printer" but i need scripted solution.
Is there a way to use the picprint and "printname" variable to specify a page size?
something like
printname = "diadem pdf printer,LPT1,11x17"
Here is what doesn't work
dim w,h
PicInScal = False ' relative positioning
PicFrame = False ' we'll handle the frame ourselves
w=11
h=17
picratio= h/w
PicwidthInScal = w-0.5
PicHeightInScal = h-0.35
PrintTopMarg = 0.17 ' top page page
PrintLeftMarg = 0.25 ' left page margin
PrintWidth = w ' page width
CALL PICpdfexport(PATH)
Jim West
06-02-2009 11:29 AM
Hey Jim,
After trying several variations, I don't think this is going to be possible. I seemed to get programmatic export to PDF to work after script recording myself manually exporting the PDF with my chosen settings and then immediately running the recorded script, but that's all. Other than that, though I can seem to set the side of the TDR in DIAdem itself, it always seems to generate a PDF of standard size.
I will file feedback to the DIAdem R&D team to take a look at this for a future release of DIAdem. Thanks for providing this feedback, Jim.
06-02-2009 11:43 AM
Can you look at the 11.1 beta and see if it works there?
jim
06-02-2009 11:59 AM - edited 06-02-2009 12:00 PM
Hey Jim,
You're a step ahead of me!
I copied and pasted your exact code (save for the fact that I added an absolute path to the PICPDFExport command) into the DIAdem 11.1 beta and ran it. The attached PDF is what I got as an output. Is that what you were looking for? Note that I used, simply, the example TDR, so things are a little out-of-whack in terms of design and layout. I am using Adobe Acrobat 8.1.5.
06-02-2009 12:11 PM
Yes, that is what I want but in V11.0
jim
06-03-2009 09:36 AM
Hi Jim,
For DIAdem 11.1 we done several improvements in the context of PDF.
In DIAdem 11.0 I've tested the following:
dim w,h
PicInScal = False ' relative positioning
PicFrame = False ' we'll handle the frame ourselves
w=11
h=17
picratio= h/w
PicwidthInScal = w-0.5
PicHeightInScal = h-0.35
PrintTopMarg = 0.17 ' top page page
PrintLeftMarg = 0.25 ' left page margin
PrintWidth = w ' page width
call PrintMaxScale
CALL PICpdfexport("D:\Test\ttt")
It seems to work.
Greetings
Walter
06-09-2009 11:55 AM
I still can't get this to work. I have 11.1 beta. I have copied the script from prior posts.
Diadem shows the correctly sized report but when the PDF export is made; the report is jammed into 8.5x11. Sample attached
I have adobe reader 9.1.1
jim
dim w,h
PicInScal = False ' relative positioning
PicFrame = False ' we'll handle the frame ourselves
w=28
h=11
picratio= h/w
PicwidthInScal = w-0.5
PicHeightInScal = h-0.35
PrintTopMarg = 0.17 ' top page page
PrintLeftMarg = 0.25 ' left page margin
PrintWidth = w ' page width
call PrintMaxScale
CALL PICUPDATE
CALL PICpdfexport("C:\Development\Spartan\www\temp\test3.pdf")
06-11-2009 09:51 AM
Hey Jim,
I updated my Adobe Acrobat reader to 9.1.2 (I was using 8.1.6) and used the exact same script commands that Walter posted above. In both DIAdem 11.0 and DIAdem 11.1 using that script and that script alone, I get a resulting PDF that is 11x17.
Could you try replicating that exact process?
I'd like to see if simplifying the process by using a script that contains only Walter's commands and our default example TDR yields the same results, as this is the test that I successfully ran.
Let me know?
06-11-2009 11:51 AM
I did as you suggested and it didn't work. However, I know why yours works.
I had a wild idea that using the manual Diadem PDF printer will affect the script output.
I did this process:
If you look at your current "diadem PDF export" printer settings, I bet they are 11x17.
Better yet, I bet if you change the size in your script, you will still get 11x17.
Jim
06-17-2009 12:37 PM
Hey Jim,
I think we're going to have to use that as a workaround until R&D can investigate this further. As a result of this post, they are aware of the behavior you've been seeing.