Host Partnership
If you are looking for good DNN hosting, then PowerDNN is the best DNN host around!
Need a custom module?
 Should you have any questions about custom DNN modules or web projects, please let us know.
|
Support Forum
| Author |
Messages |
|
Jeff Hughes Posts:7

 |
| 08/07/2010 11:03 PM |
|
Thanks for adding this capability, I really needed it. For those that haven't figured it out, you need to add the following to your .xml file: <Property name="PdfPageSize"> <value>7</value> </Property> and then your options become: 1 = Letter 2 = 7.5 x 10.00 - B5? 3 = Legal 4 = A0 5 = A1 6 = A2 7 = A3 8 = A4 (default) 9 = A5 10 = A6 and so on I assume... Please add this to the documentation. -Jeff |
|
|
|
|
Pengtsen R Posts:11533

 |
| 08/08/2010 1:15 PM |
|
| Thank you very much, Jeff. |
|
Pengtsen R http://www.bizmodules.net |
|
|
ken stessens Posts:13

 |
| 09/23/2010 12:25 PM |
|
Hi, the XML "FitWidth" option does not seem to have any effect. Any idea what could be the cause? The page is: www.catcams.com/portals/0/SaveAsPdf/pn1013661.html PageSize should be A4, orientation should be landscape (I got this working already) Thanks, Ken |
|
|
|
|
Pengtsen R Posts:11533

 |
| 09/24/2010 3:01 PM |
|
| what do you mean by FitWidth is not working? how to see the effect? |
|
Pengtsen R http://www.bizmodules.net |
|
|
ken stessens Posts:13

 |
| 09/25/2010 11:08 AM |
|
Hi, I was hoping that this option would resize the width of the page so it nicely fits and centers on the generated PDF. The aspect ratio would be maintained to resize the height. sample page: http://www.catcams.com/portals/0/saveaspdf/pn1013661.html generated pdf: http://www.catcams.com/portals/0/saveaspdf/1013661.pdf Thanks, Ken |
|
|
|
|
Pengtsen R Posts:11533

 |
| 09/28/2010 2:11 PM |
|
| So I guess it's a bahavior or the pdf conversion component. Save as Pdf do pass this parameter to the component. |
|
Pengtsen R http://www.bizmodules.net |
|
|
ken stessens Posts:13

 |
| 10/25/2010 9:27 AM |
|
Hi, that the "FitWidth" option is set to "True" as a default. It seems to be working correctly when the page is in portret, but there is a white border remaining at the right when the page is in landscape. You can easily check this when you convert a page with a background color. I don't know whether that could be a bug in the winnovative component. Maybe there is a workaround for this issue by setting custom values for both the page width (297) and height (210) so the page becomes A4 landscape by itself. Thanks in advance, Ken |
|
|
|
|
Pengtsen R Posts:11533

 |
| 10/25/2010 1:36 PM |
|
| I'm not exactly sure how to reproduce this, do you have a sample? |
|
Pengtsen R http://www.bizmodules.net |
|
|
ken stessens Posts:13

 |
| 08/30/2011 5:29 AM |
|
Hi Pengtsen, I use this settings to create an A4 page in landscape orientation: <Property name="PdfPageSize"> <value>8</value> </Property> <Property name="PdfPageOrientation"> <value>1</value> </Property> This was working ok in the past, but now I have another page and it is always using 'portret' orientation Please confirm the settings and let me know if any other setting or action is required Thanks in advance for a swift response, Ken |
|
|
|
|
ken stessens Posts:13

 |
| 08/30/2011 7:56 AM |
|
Hi again, I did try to use some different settings without any luck. However, I did notice some strange behaviour: - if I use PageSize=7, the orientation is set to landscape (correct). When I reset to PageSize=8, then the orientation automatically becomes portret again (not correct) - even when my html page is never modified, sometimes the layout is suddenly changing. I can send you 3 different pdf results that all come from the same html page! Please reply ASAP, this is driving me crazy! Best regards, Ken |
|
|
|
|
Pengtsen R Posts:11533

 |
| 08/30/2011 9:50 AM |
|
| you need to restart your website after making any changes to the xml. |
|
Pengtsen R http://www.bizmodules.net |
|
|
ken stessens Posts:13

 |
| 08/30/2011 11:40 AM |
|
Hi Pengsten, I need to print pages with session information, so I use this trick: I create a printer friendly page that contains HTML only (no session data) and I save it in a dedicated folder. This is the link to an example html page: http://www.catcams.com/portals/0/SaveAsPdf/pn7671319test.html - if I restart the application, the generated pdf has the correct page size and orientation, but the html layout is totally messed up. This is the pdf result: http://www.catcams.com/portals/0/SaveAsPdf/7671319test1.pdf - if I delete the html page so the SAP module has no input, the pdf file is corrupt and cannot be opened. However, after this has happened 1 time and the html page is restored, the next time a valid pdf is generated with correct layout. However, the page orientation reset to portait instead of landscape. This sequence results in this pdf file: http://www.catcams.com/portals/0/SaveAsPdf/7671319test2.pdf Please let me know what can cause this behaviour, and let me know the correct settings for the xml file Thanks, Ken |
|
|
|
|
Pengtsen R Posts:11533

 |
| 08/30/2011 9:26 PM |
|
You said: if I delete the html page so the SAP module has no input, the pdf file is corrupt and cannot be opened You mean to access the SAP module(by using Saveaspdf.aspx) without an invalid input? then save as pdf returns an invalid pdf file, and since then it doesn't use your custom settings in saveaspdf.xml? |
|
Pengtsen R http://www.bizmodules.net |
|
|
ken stessens Posts:13

 |
| 08/31/2011 1:26 AM |
|
Hi, when a DNN page is loaded, a clean 'HTML only' copy of the page is automatically stored in a dedicated folder. This is an example of the automatic 'HTML only' page: http://www.catcams.com/portals/0/SaveAsPdf/pn7671319test.html On the DNN page, there is a link to the SAP module: <a href='http://www.catcams.com/DesktopModules/SaveAsPDF/DownloadPdf.aspx?Name=7671319&Url=http://www.catcams.com/portals/0/SaveAsPdf/pn7671319.html' target='_blank'> - if I adjust all settings and restart the application, then I get this result: http://www.catcams.com/portals/0/SaveAsPdf/7671319test1.pdf You see that the page orientation is landscape (correct), but the HTML layout is wrong -if I manually delete the HTML page ( "http://www.catcams.com/portals/0/SaveAsPdf/pn7671319.html'") after it was automatically created on pageload, then the SAP module will receive no HTML file. As a result, the Adobe Reader plugin shows an error (pdf file corrupt). After this has happened 1 time, I refresh the DNN page so the HTML file is created again. The next times that the SAP module is called (using <a href='http://www.catcams.com/DesktopModules/SaveAsPDF/DownloadPdf.aspx?Name=7671319&Url=http://www.catcams.com/portals/0/SaveAsPdf/pn7671319.html' target='_blank'>), the generated PDF file is different: http://www.catcams.com/portals/0/SaveAsPdf/7671319test2.pdf You see that the layout is identical to the HTML output, but the page is in portrait orientation (wrong). So I think this is happening: - the HTML page looks nice and identical in all browsers (please check HTML the page header to see if all required information is there for the SAP module) - after restarting the application, the XML settings are loaded for the SAP module - maybe there is an error in the SAP settings (I have checked many times, but I cannot find the error) - as a result of the wrong XML settings, the layout of the generated PDF is not identical to the HTML page - when the html file does not exist, the SAP module gets no input and makes an internal error. The next time the SAP module will use the default settings instead of the XML file and the PDF file looks exactly as the HTML page. However, the page orientation is also reset to portrait (default) Please let me know what could be wrong. This is driving me crazy for 2 days now! Thanks, Ken |
|
|
|
|
Pengtsen R Posts:11533

 |
| 09/01/2011 3:17 AM |
|
Let me share a good news with you, I just tried it with my local Save As PDF instance, and it seems to properly generate the pdf with landscape oritentation. Now the question is, when did you download this module? |
|
Pengtsen R http://www.bizmodules.net |
|
|
|
| You are not authorized to post a reply. |
|
|
|
ActiveForums 3.7
|