Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««89101112

Creating a PDF from a Stored Procedure Expand / Collapse
Author
Message
Posted Thursday, February 28, 2013 11:18 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Yesterday @ 1:20 AM
Points: 2, Visits: 19
Hey Ivica. Your stored procedure is very good. Thanks for that. I just want to know one thing. I am trying to get 20 columns per row. I have changed column lengths of #pdf , #xref, #text and also modified substring part to include the length.. tables and all that. The query executes properly.
The problem is that the pdf displays rows only upto a certain length. Rest of the columns are discarded or maybe cutoff.

How do I turn the orientation of pdf from portrait to landscape?
OR
How do I increase page width?

I have taken a look at Acrobat Reference Manual but didn't find anything useful as for page width or orientation.
I got some annotations for Font and RichMediawindow. For eg.
3 0 obj
<< /Type /Page
/Parent 4 0 R
/MediaBox [0 0 612 792]
/Resources << /Font << /F3 7 0 R
/F5 9 0 R
/F7 11 0 R
>>
/ProcSet [/PDF]
>>
/Contents 12 0 R
/Thumb 14 0 R
/Annots [ 23 0 R
24 0 R
]
>>
endobj

Is there anything like this I can change in sp to increase page width or orientation.

BTW. Thanks again. Your SP is great.
Post #1425362
Posted Friday, March 01, 2013 3:01 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Yesterday @ 1:20 AM
Points: 2, Visits: 19
Anyway I solved my problem. Apparently acrobat api doesn't have any width or orientation properties.
Width is controlled by Mediabox parameters and orientation is controlled by Rotation property.
I was able to accommodate 15 columns with consistent spacing among all rows by increasing mediabox's parameters.

That gives it a landscape orientation effect.

Also whatever formatting I did was only before the sql2pdf execution. i.e. By using SPACE() function in sql.
Maybe I'll look into how to directly enter a whole table as a parameter.

Once again.
Thanks alot.

Regards,
C.Pednekar.
Post #1425407
Posted Wednesday, May 15, 2013 12:59 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Yesterday @ 1:09 AM
Points: 2, Visits: 3
for creating psd files , a good software is abusolutely indispensible. I do this almost daily. I use a PDF generator driver which is found on the internet . Install it and it becomes a selectable generator option.Then you can create PDFs in any program at all, including Adobe Acrobat reader! Just open a PDF, select print, and specify the page range you want to print and select the Raster edge generator driver
Post #1452945
Posted Wednesday, May 15, 2013 4:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, May 15, 2013 4:45 AM
Points: 1, Visits: 3
Has anyone been able to increase the max line length above 80 characters?

Nevermind. found it.

FOR SELECT SUBSTRING((code + SPACE(81)), 1, 80) FROM #text WHERE idnumber BETWEEN ((@nopg * 60) + 1) AND ((@nopg + 1) * 60 )

To

FOR SELECT code FROM #text WHERE idnumber BETWEEN ((@nopg * 60) + 1) AND ((@nopg + 1) * 60 )
Post #1453007
« Prev Topic | Next Topic »

Add to briefcase «««89101112

Permissions Expand / Collapse