[Html2PdfConverter] [Html to PDF Converter] Discussion - OutSystems [PDF]

May 13, 2011 - However, when creating the pdf, the error is always true, due to those graphs (i've tried to print the same page, but removed the graphs, and it worked). I also know the page itself is correct, since i've acessed it with the same graphs and it didn't have any errors. In The 'HTMLToPdfConverter' eSpace, i've ...

12 downloads 85 Views 4MB Size

Recommend Stories


Winnovative HTML to PDF Converter for .NET
Never let your sense of morals prevent you from doing what is right. Isaac Asimov

Generated with ExpertPdf Html To Pdf Converter
No matter how you feel: Get Up, Dress Up, Show Up, and Never Give Up! Anonymous

Generated with ExpertPdf Html To Pdf Converter
Do not seek to follow in the footsteps of the wise. Seek what they sought. Matsuo Basho

Winnovative HTML to PDF Converter for .NET
Don't ruin a good today by thinking about a bad yesterday. Let it go. Anonymous

Winnovative HTML to PDF Converter for .NET
Learning never exhausts the mind. Leonardo da Vinci

Winnovative HTML to PDF Converter for .NET - www.winnovative-software.com
If you want to go quickly, go alone. If you want to go far, go together. African proverb

Php export html page to pdf [PDF]
Fergus TREF venture vestigial and their coverage or ogresses moderato php export html page to pdf clunks. revenued Artur faradizing, disassembles their arbitration Purfle topically. Smarty and reformasi birokrasi polri dalam pemilu 2014 cracking Matt

البحث -html doc- PDF
Don’t grieve. Anything you lose comes round in another form. Rumi

البحث -html doc- PDF
No amount of guilt can solve the past, and no amount of anxiety can change the future. Anonymous

البحث -html doc- PDF
You often feel tired, not because you've done too much, but because you've done too little of what sparks

Idea Transcript


Community › Forums › Forge Discussions



Search the Forums

NEW POST

Forge Component

Html2PdfConverter 45 votes Published on 9 Feb (13 days ago) by Guilherme Pereira

Available Forums

Diogo Cordeiro Rank: #168 Posted on 2011-05-13

Technology & Integration News and Announcements

Hey hey.

Forge Discussions

Just to say : This component made my day.

Meta

With Best Regards and Many Thanks,

Community Quick Guides

Diogo Cordovil S. Cordeiro

Usability Installation Troubleshooting Dislike

(0)

Like

(3)

Personal Environment Troubleshooting

Diogo Cordeiro Rank: #168 Posted on 2011-05-13

Forum Notifications Anybody knows how to add page breaks at specific spots, as well as page numbers (in the header or footer for example), using this extension ?

Email Digest Settings

Thanks, Best Regards, Diogo Cordovil S. Cordeiro

Dislike

(0)

Like

(0)

Diogo Cordeiro Rank: #168 Posted on 2011-05-24

Hello everyone, I've just altered the oml and the extension. (Don't know how to publish it as a new version : perhaps someone might analyse this changes and see if it is elegible as a new version). I edited it with VS Studio 2010 Express. I am having some difficulties uploading the "osp"...To which e-mail can i send it so you might post it here? The main extension function GeneratePDF now allows to input extended arguments. The oml, now has a screen with the extended help (so you don't have to go to the command-line), and inputs to allow you to add page numbers either to bottom-right or top-right in the format #/#. Best Regards, Diogo Cordovil S. Cordeiro

Dislike

(0)

Like

(1)

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2011-05-24

Hi Diogo! nice to know that! drop me an email (see private message) with the osp, i'll upload it as a new version, and ofcourse crediting your job! regards, Miguel Antunes

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(2)

Diogo Cordeiro Rank: #168 Posted on 2011-05-24

E-mail sent. Tell me if you find something that would need to be changed Best Regards, Diogo Cordovil S. Cordeiro

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2011-05-24

Version 1.0.1 is out, take a look! Thanks to Diogo Cordeiro for all the new features!

Luís Reis Rank: #10481 Posted on 2011-06-09

Hi I'm trying to use this component to convert a page that has Flash graphs, generated with the Fusion Charts Component. However, when creating the pdf, the error is always true, due to those graphs (i've tried to print the same page, but removed the graphs, and it worked). I also know the page itself is correct, since i've acessed it with the same graphs and it didn't have any errors. In The 'HTMLToPdfConverter' eSpace, i've edited the 'OtherArgs' argument in the 'GeneratePDF' action to enable plugins: If(WhereToAddPageNumber="H","--enable-plugins --header-right ""[page]/[topage]""", If(WhereToAddPageNumber="F", "--enable-plugins --footer-right ""[page]/[topage]""" ,"--enable-plugins")) But it doesn't seem to work.

Any suggestions?

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

wallace stephen Rank: #48799 Posted on 2011-06-21

Great! Recommend you another component: Spire.PDF which also can convert html to pdf

Diogo Cordeiro Rank: #168 Posted on 2011-06-21

Hey wallace, is there any free, non-trial/available for commercial use, license for that component? Best Regards, Diogo Cordovil S. Cordeiro

Dislike

(0)

Like

(0)

wallace stephen Rank: #48799 Posted on 2011-06-21

Spire.DataExport Comunity is a Free Component which can export data from database to PDF and other popular file formats... but not support file conversion...

Dislike

(0)

Like

(0)

Diogo Cordeiro Rank: #168 Posted on 2011-06-21

Ok.it is nice to know about the component. I can think of some different uses for it, like building dynamic structured reports. It is also an alternative for this. Why don't you try and make it Outsystems ready? Best regards, Diogo Cordovil S. Cordeiro

Dislike

(0)

Like

(0)

Hugo Teodoro Rank: #20255 Posted on 2011-10-04

Hi! I was looking to get some understanding on an issue that I'm getting when using this extension. The issue is that when I try to export a screen of my application, after making successfull login, it always exports my login screen.. I guess that makes sense in a way because the user that is going to access it (from the extension) doesn't have access to the application, it's not a user in it. So.. what I'm missing here? Thanks! Best regards! Hugo Teodoro

Dislike

(0)

Like

(0)

Luís Reis Rank: #10481 Posted on 2011-10-04

Hugo Teodoro, The solution to that is to make the webscreen you're trying to export "Public" in the Web Screen Properties. However, this means that anyone who knows the link can access that screen without logging in to your application, so keep that in mind. Regards, Luis Reis

Dislike

(0)

Like

(1)

(0)

Like

(0)

Hugo Teodoro Rank: #20255 Posted on 2011-10-04

Hi Luis, Thanks for the help and for the quick reply. Indeed, that's a harsh trade-off to make.. I'll consider that when aplying this extension. Best regards, Hugo Teodoro

Dislike

Luís Reis Rank: #10481 Posted on 2011-10-04

Hugo Teodoro, To that situation, a possible solution is to mannually redirect the user to the login screen in the Preparation Action of the Web Screen. Use the "login_getusermasterid()" function to check if the user has logged in or not and if not, take him to the Login Screen. I never tested this extensively, so i can't say for sure it's bulletproof, but it's a sugestion.

Best Regards, Luís Reis

Dislike

(0)

Like

(0)

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2011-10-04

Hi Hugo, thats indeed a trade-off, but you can do some kind of validation on the preparation, create an hash code before calling the page, send it to the screen and in the preparation generate that hash, compare them and only download if they match. hope this help! regards, Miguel

Dislike

(0)

Like

(1)

Dislike

(0)

Like

(0)

Hugo Teodoro Rank: #20255 Posted on 2011-10-06

Hi guys, Thanks for the thoughts on this. I still hadn't the chance to try it but I will. Best regards, Hugo

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-10-07

The component uses a separate executable, wkhtmltopdf.exe, to do the actual conversion. I have checked on our platform (development) server where this executable lives, and found to my suprise that it is all over the place: there are 30 copies in the Program Files\OutSystems\Platform Server (sub)directories, and since this executable is almost 6MB, that's 180MB of seemlingly superfluous executables. It is present in both running\, test\ and share\ subdirectories of many eSpaces, most of which do not even use the extension. So I'm a bit at loss what happens here, and why the platform wants to keep copies of the executable in so many, even unrelated, directories.

Dislike

(0)

Like

(0)

Diogo Cordeiro Rank: #168 Posted on 2011-10-07

Hi Kilian, what is the version of the platform server that you are running? Is the Outsystems Deployment Service running well? This service runs a process to clean obsolete directories usually... You can also do this manually, by checking what's the current vdir in IIS, and deleting the other ones... As for the test directory, it is associated with the personal area. Best Regards, Diogo Cordeiro

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-10-07

Hi Diogo, we're running version 5.0, and yes, everything's running fine. We do not have obsolete directories. My observation is that the EXE-file that is used by the Html to PDF converter (i.e. wkhtmltopdf.exe) is present, on the file system, in many eSpace directories, though these eSpaces do not reference the HtmlToPDF eSpace. I know what the test directories are, but I do not know why in the test directory of a non-related eSpace the EXE-file is sitting.

Dislike

(0)

Like

(0)

Diogo Cordeiro Rank: #168 Posted on 2011-10-07

Does the executable file appear on all eSpace directories, or on specific ones? Do you usually publish the HtmlToPDF in a solution alongside the other eSpaces where the "exe" is showing up?

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-10-07

Hi Diogo, it appears in specific ones, which are somewhat related to the one eSpace that actually references the HtmlToPDF eSpace. In this case, since we're talking about the developer server (it hasn't been published elsewhere), there has not been any solution published.

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

João C. Coelho Rank: #3082 Posted on 2011-10-07

Hi Kilian, Any change you could release the 5.0 version of this component ? TIA, João Coelho

Rui Eugénio Rank: #642 Posted on 2011-10-10

Hello, The behaviour you are observing is by design. Every dependency of a specific eSpace is copied to that eSpace directory, so the eSpace becomes isolated of the rest. So, if you latter break a producer eSpace or extension by mistake, the consumers won't break until you publish them. In this way, when you publish something, you are certain that you'll only break the eSpace or extension you are publishing and not anything else. So, the apperance of the various copies of the executable is because you are consuming the extension, or a eSpace that uses the extension, on various eSpaces. Hope this helps to clarify, Rui Eugénio

Dislike

(0)

Like

(0)

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-10-10

Hi Rui, thanks for the explanation, it makes perfect sense to the cases I have observed.

Dislike

Diogo Pacheco Rank: #1679 Posted on 2011-10-10

Can anyone explain how does this work explicitely?! If i want to make an html webpage based on a report template and then export it to a pdf would this work? Is that it? And if it is, where are the output files? I don't find any pdf file after run this action!

Dislike

(0)

Like

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-10-11

Hi Diogo, the action returns the binary data for the PDF. You'll have to save that, or download that, explicitly.

Dislike

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-10-11

Hi Joao, sorry for the late reply. I haven't actually integrated the component myself, a collegue did. But given that he didn't rant into much problems, I figure it's quite easy to do so.

Dislike

(0)

Like

(0)

Diogo Pacheco Rank: #1679 Posted on 2011-10-11

How can i save the binary from the file and create a single pdf file for download or just consult?! Can anyone give me an hint?! Thanks.

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-10-11

Diogo, the easiest is to use Download, with as File Content the output of the PDF converter and Mime-Type "application/pdf".

Dislike

(0)

Like

(0)

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2011-10-11

Hello Diogo, and welcome! Well that is done by using the end flow widget "Download". But take a look on the Example Screen of this component, you have there a working example on how to use it and how to download it. let us know if you need some more help. regards, Miguel

Dislike

(0)

Like

(0)

Diogo Pacheco Rank: #1679 Posted on 2011-10-11

Hello again and thanks to Miguel and Kilian! It was really easy to do what you've both told me to do but i got an error and i can't open the pdf file. Do you know why is this appening? Thanks again.

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-10-11

Diogo, although my Portuguese is limited, it seems you server Adobe PDF Reader something that is not a PDF. My guess would be that you do not correctly supply the htmltopdf output to the Download, or alternatively there's something going wrong with the conversion and the binary output is invalid.

Dislike

(0)

Like

(0)

Diogo Pacheco Rank: #1679 Posted on 2011-10-11

Sorry about the portuguese language Kilian! I will try to fix the problem. If i solve it i'll report it on the forum. Anyway, if you've any suggestion and i didn't solve the problem yet please inform me and i'll thank you again!

Dislike

(0)

Like

(0)

Diogo Pacheco Rank: #1679 Posted on 2011-10-11

Can't solve it! I've tested with other url links and the same problem appeared. How can i know if the conversion is made correctly?!

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

João C. Coelho Rank: #3082 Posted on 2011-10-11

Hello Diogo, - What properties are you using on the Download widget? - What size does the file you generated have ?

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-10-11

Diogo: any valid PDF starts with %PDF, and in case of wkhtmltopdf, it also contains a "/Producer (wkhtmltopdf)" somewhere near the start. You could check whether you have at least a valid PDF file.

Dislike

(0)

Like

(0)

Diogo Pacheco Rank: #1679 Posted on 2011-10-11

Download widget properties: File Name: "Teste.pdf" FileContent: HtmlToPdfConverter.Binary Mime-Type: "application/pdf" Save to Disk: Yes The file generated has 0 KB... Hmmm, strange, the file is empty! When i run the action i only give an URL. I've tested with an html sample code page and with the built-in function GetOwnerUrlPath().

Dislike

(0)

Like

(0)

Diogo Pacheco Rank: #1679 Posted on 2011-10-11

If i run the htmltopdfconverter application the same appends! I've selected "outsystems network", "google" and a default url and neither of them returns a valid pdf. All of theme returned a pdf with 0 KB size.

Dislike

(0)

Like

(0)

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2011-10-11

Hello, Diogo could you check the references of the example eSpace? is every dependency in the server and up to date? have you tried to republish the solution? let us know. regards, Miguel

Dislike

(0)

Like

(0)

Diogo Pacheco Rank: #1679 Posted on 2011-10-11

I've republished my project, i've republished HtmlToPdfConvert and it continues. Here's a print screen of when i published HtmlToPdfConvert (there's some warnings...)

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-10-11

Hi Diogo, could this be to proxy settings? wkhtmltopdf must be able to access the URLs you supply it with. You can use the -p (or --proxy) parameter to specify the proxy server.

Dislike

(0)

Like

(0)

António Chinita Rank: #15 Posted on 2011-10-11

Have you checked the error log? All the errors I had with this component, one of them being "unable to resolve hostname", showed in the Service Center error log. If it's a proxy issue, an error should be logged there... Just as a tip, and totally not related to the previous issue, I used "localhost" as the server for the url's (provided they were in the same server I was generating the pdf from). Using localhost allowed me to bypass dns name resolution, that was malfunctioning in the client's network.

Dislike

(0)

Like

(0)

Diogo Pacheco Rank: #1679 Posted on 2011-10-11

I think i'm not using correctly the application and probably is that my problem. LOL well, i'll try to explain the fases that i've passed using the app and probably (certainly) you will be able to identify my mistakes, probably big mistakes! Eheh 1st -> publish the app eSpace 2nd -> add references on my project 3nd -> create a button that calls the Action 4th -> WORKFLOW (PROBABLY MY PROBLEM CAUSE I THINK IT'S VERY SIMPLIFIED) ... my work flow only have Start -> HtmlToPdfConverter (Action) -> Download Widget... Now i'm sure you'll identify my beginner errors! :)

Dislike

(0)

Like

(0)

Diogo Pacheco Rank: #1679 Posted on 2011-10-11

In the Service Center error log i've "unable to find file..." and all of the unable files are on Windows\Temp directory... Is this sign of a proxy error?!

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Diogo Cordeiro Rank: #168 Posted on 2011-10-11

Hey there, Have you tried to run the example in the Example oml ? Does it work? Best Regards, Diogo C S Cordeiro

Diogo Pacheco Rank: #1679 Posted on 2011-10-11

Hi Diogo! That's what i've tried to say before. I've already run the example in the Example OML and the same happened. I've tried "outsystems networks", "google" and the defaul url options and neither of them returned a valid pdf file...

Dislike

(0)

Like

(0)

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2011-10-11

Hello, from what it looks, it seems that is everything fine with eSpace/References, my guess on that errors is probably that there are no permissions to write in the windows temp folder. could you check that? regards, Miguel

Dislike

(0)

Like

(0)

António Chinita Rank: #15 Posted on 2011-10-11

Seems to me like some access issue. Can you post the full error stack? :) And check for other error messages before the final "unable to find file", because that might just be an error resulting from a different error that ocurred previously. If you find any, please postEdit: I just repeated what Miguel said. haha. Sorry.

Dislike

(0)

Like

(0)

Diogo Pacheco Rank: #1679 Posted on 2011-10-11

Everytime i run the application 2 erros are logged... The first one is says "Extension method" on Module column and the complete stack is this: em System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) em System.IO.FileInfo.get_Length() em OutSystems.NssHtmlConvertToPdf.CssHtmlConvertToPdf.MssGeneratePDF(Byte[]& ssPDFBinary, String ssProxy, String ssURL, String ssOtherArgs) em ssHtmlToPdfConverter.RssExtensionHtmlConvertToPdf.MssGeneratePDF(HeContext heContext, String inParamProxy, String inParamURL, String inParamOtherArgs, Byte[]& outParamPDFBinary)

The second complete stack is this: em ssHtmlToPdfConverter.RssExtensionHtmlConvertToPdf.MssGeneratePDF(HeContext heContext, String inParamProxy, String inParamURL, String inParamOtherArgs, Byte[]& outParamPDFBinary) em ssHtmlToPdfConverter.Actions.ActionHtmlToPdfConverter(HeContext heContext, String inParamURL, String inParamWhereToAddPageNumber, Byte[]& outParamBinary, Boolean& outParamError) -EnveSpaceVer: 11 (Id=32, PubId=31, CompiledWith=6.0.0.10) RequestUrl: http://localhost/Teste/UserTaskHistory_List.aspx AppDomain: /LM/W3SVC/1/ROOT/Teste-81-129628153371112575 FilePath: C:\...\PS\running\Teste.0741024893\UserTaskHistory_List.aspx Locale: pt-PT DateFormat: yyyy-MM-dd PID: 5784 ('w3wp', Started='11-10-2011 08:12:41', Priv=194Mb, Virt=793Mb) TID: 8 .NET: 2.0.50727.5446

Dislike

(0)

Like

(0)

(0)

Like

(0)

António Chinita Rank: #15 Posted on 2011-10-11

Have you tried setting the %windir%\temp folder permissions to read and write for all users?

Dislike

Miguel Escaleira Rank: #9107 Posted on 2011-10-12

Hi. Anyone can help me ? I'm testing the HTML to PDF converter. But even trying the default page I always get the same error in Service Center. I already checked the temp dir permitions in server but seems the users can read and write in the folder.

I'm sending the error stack above: f11ef3b7-e9264e38-938c560215789697 Time of Log: 2011-10-12 16:14:38 eSpace: HtmlToPdfConverter Tenant: HtmlToPdfConverter User: Session Id: r0lxjtb3hx3lgajq0ux4mz55 Server: UCPFSIGV1 Module: Could not find file 'C:\Windows\TEMP\\TEMP12142011-161438-244.p122'. Message: at ssHtmlToPdfConverter.RssExtensionHtmlConvertToPdf.MssGeneratePDF(HeContext heContext, String inParamProxy, String inParamURL, String inParamOtherArgs, Byte[]& outParamPDFBinary) at ssHtmlToPdfConverter.Actions.ActionHtmlToPdfConverter(HeContext heContext, String inParamURL, String inParamWhereToAddPageNumber, Byte[]& outParamBinary, Boolean& outParamError) -EnveSpaceVer: 7 (Id=2494, PubId=2142, CompiledWith=6.0.0.10) Stack: RequestUrl: http://ucpfsigv1/HtmlToPdfConverter/HowTo.aspx AppDomain: /LM/W3SVC/1/ROOT/HtmlToPdfConverter-1941-129629056597540417 FilePath: C:\...\PS\running\HtmlToPdfConverter.348119017\HowTo.aspx Locale: en-US DateFormat: dd-MM-yyyy PID: 368 ('w3wp', Started='24-09-2011 16:30:05', Priv=352Mb, Virt=3248Mb) TID: 93 .NET: 2.0.50727.5446

Dislike

(0)

Like

(1)

Ricardo Araújo Rank: #86 Posted on 2011-10-12

Hi Miguel, did you defined the Run As property in the service center? Assuming that you're running a Microsoft Server, you'll need to define the read&write privileges on the %win%/temp folder. Sometimes, due the security rules the IIS user can't have that special permissions. In that scenario, I would suggest to create a specific local windows user to this operation with the right permissions in that folder and then, rememeber to set the "run as" property in the service center. Let me know if it worked. Cheers, RNA

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Miguel Escaleira Rank: #9107 Posted on 2011-10-12

Hi Ricardo. It's not working. Before teh post I already tried grant permitions for everyone in the temp dir. I tried the Run As but it's the same. Do you have any clue ? Thanks.

Ricardo Araújo Rank: #86 Posted on 2011-10-12

Miguel, The page you're trying to print to pdf, does it have anonymous access? Cheers, RNA

Miguel Escaleira Rank: #9107 Posted on 2011-10-12

Hi again Ricardo. Yes, both (anonym. and regist.) Thanks. :(

Ricardo Araújo Rank: #86 Posted on 2011-10-12

Hi Miguel, try to uncheck "register" You can't have both, this means that you can't have the "register" checked, because when you execute it, the is no user logged in. Hope it solves. RNA

Dislike

(0)

Like

(0)

Nuno Silva Rank: #10849 Posted on 2011-10-12

Hi there, Just to say that I experienced the same problem and verified that the "Anonymous" role on the webscreen must be set in order for it to work.

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Miguel Escaleira Rank: #9107 Posted on 2011-10-13

Hi guys, When the anonymous is checked, the Registered is also always checked..

Ricardo Araújo Rank: #86 Posted on 2011-10-13

Sorry Miguel, shame on me, I've read one thing and understood another. Can you check defined security in the webflow of that websceen? The Integrated Authentication must be turned to NO Cheers, RNA

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Miguel Escaleira Rank: #9107 Posted on 2011-10-13

Hi Ricardo, Yes, it's defined as integrated. I'm testing the demo HTM to PDF eSpace with changing anything. Later I'll replicate it the configuration to the real situation.

Ricardo Araújo Rank: #86 Posted on 2011-10-13

Miguel, I believe that's the problem. You can't have Integrated authentitcation in the webflow of that web screen you're trying to convert to pdf from html I've seen that problem in a similar situation. Cheers, RNA.

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Miguel Escaleira Rank: #9107 Posted on 2011-10-13

Hi again. I tried without the authentication and is the same. Thanks for your time.

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-10-14

To all those who cannot get it to work: did you try to manually invoke wkhtmltopdf.exe from the server, with the same user as used by OutSystems (runas property)? If that succeeded, have you tried to invoke the exact command that the eSpace uses to invoke wkhtmltopdf.exe, including output to tmp directory etc.? Did that work? It seems that most of the problems are not related to security of the screens at all, but to other, operating system-related, problems like proxy servers and user rights.

Dislike

(0)

Like

(0)

Hugo Teodoro Rank: #20255 Posted on 2011-10-17

Hi all, To: Miguel Escaleira The only way I could get it to work without the error that you posted regarding service center was by setting the webscreen to public and anonymous access "on". Didn't had the need to turn of integrated security (it is blank..) or setting runas of espace. But this was for me, as Kilian says, it might depend on other security issues of your environment. To: ALL Still, struggling again.. This time I was hopping to use this extension to generate a neat pdf with charts but no luck.. get the same dialog box Diogo posted, with file size = 0 bytes. I'm guessing that the extension is unable to render the charts generated in flash (I'm using charting services) Does anyone see a light at the end of the tunnel for this..? Thanks, Hugo Teodoro

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-10-18

Hugo: If you think about it, it is rather obvious the extension won't render Flash: Flash is a client-side plugin, that lives in your browser. wkhtmltopdf converts HTML (what's in a name), and acts as a client ("browser"), rendering the HTML it receives from the URL. It can not render Flash as it does not have a Flash plug-in (which would be impossible, since it is not a browser).

Dislike

(0)

Like

(2)

Dislike

(0)

Like

(0)

Diogo Nesbitt Rank: #198 Posted on 2011-10-18

Hello Hugo, are you creating data charts in preparation or on list late load event?

J. mvp_badge mvp_label Rank: #6 Posted on 2011-12-02

FontTest.zip Hello, I have an issue with @font-face and the html2pdf converter. I have installed 2 ttf's on the server, 1 is bold and the other a normal font. in my css I use both ttf's in font-face, and on my screen I see quite cleary the difference between the 2 fonts on weight. yet when using the html2pdf it doesn't show up as bold. attached in the zip are a printscreen of the webscreen, the pdf and the non-ipp'ed oml (the custom fonts are in the resources and should be installed accordingly ofcourse)

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-12-02

Since the extension uses the webkit rendering engine, you could try a webkit browser (e.g. Safari, iirc) to check whether it renders fine there. In general the extension is just a wrapper around a 3rd party tool, so it's not the extension to blame.

Dislike

(0)

Like

(0)

J. mvp_badge mvp_label Rank: #6 Posted on 2011-12-02

Wether to blame the extenion is strange, since I simply use the extension :). That said, it renders bold and italic just fine in chrome, so it should show up in the pdf as well, imho. will check with an update wkhtml if it works better... seems we have 0.9.9 and newere versions already exists.

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-12-02

Did you try invoking the wkhtmltopdf.exe manually? Iirc, it can give some feedback in some cases, maybe it'll show an error or something.

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

J. mvp_badge mvp_label Rank: #6 Posted on 2011-12-05

Hi, did it manually wikth no effect. It refuses to show the bold,italic in the pdf. I have reported on the wkhtmltopdf site and hopefully they will give an answer.

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2011-12-12

Hi guys! just to let all of you know that the version 1.0.2 is out! Version 1.0.2 * Its now possible to convert to image (wkhtmltoimage). * Upgraded to version wkhtmltox-0.11.0_rc1. * Created example screen for image conversion. * Improved example screen for pdf, allowing user to make use of arguments. * Example screens now show the possible arguments to use. * Added an output message, that shows exactly the output message from the executable. * Performance improvements. * Fixed a bug when no pdf/image were created during an error in wkhtmltopdf/wkhtmltoimage executable. * Others small fixes.

as always feel free to leave feedback. regards, Miguel Antunes

Dislike

(0)

Like

(1)

Dislike

(0)

Like

(0)

J. mvp_badge mvp_label Rank: #6 Posted on 2011-12-19

Hi, I am using the action in the espace instead of accessing the xif directly. But we are "stuck" with only 2 positions with the header/footer any plans to create a normal action where you simply place the otherArgs yourself. Otherwise I need to change the espace everytime ther is an upgrade :)

thanks in advance.

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2011-12-19

Hi Joost, I'm a bit lost what you mean. The HTML to PDF converter is a component, the eSpace just an example. You're meant to create your own eSpace to take advantage of the component. The component simply converts any given HTML page to a PDF. I don't understand what difficulties you have in using it.

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

J. mvp_badge mvp_label Rank: #6 Posted on 2011-12-19

Simply put: I'm lazy. Basically I use the espace provided. and altered some stuff in there. Wish I would that be a permanent change :)

rohit Rank: #16791 Posted on 2012-01-06

Hello, I am facing the same problem as Miguel. I am using platform 6.0.1.10 on Windows server 2008 R2 64 bit. I do not see where to set the "Run As" property in the Service Center. Also, I do not see where to change the "Temp" folder location in Site Properties for the solution.

I get this error on the error log: Extension metho Could not find file 'C:\Windows\TEMP\TEMPFXKRYYJDOQ.pdf'. Message: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.IO.File.ReadAllBytes(String path) at OutSystems.NssHtmlConvertToPdf.CssHtmlConvertToPdf.MssGeneratePDF(String ssURL, String ssProxy, String ssOtherArgs, Byte[]& ssPDFBinary, String& ssMessageOutput) at ssHtmlToPdfConverter.RssExtensionHtmlConvertToPdf.MssGeneratePDF(HeContext heContext, String inParamURL, String inParamProxy, String inParamOtherArgs, Byte[]& outParamPDFBinary, String& outParamMessageOutput)

Stack:

Please help. Thanks

Dislike

(0)

Like

(0)

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2012-01-06

Hello Rohit, to set the "Run As" option you need to go to Service Center, HtmlToPdfConverter espace then Operation tab, and there you set it. try that to see if it fixes the error. Regarding the possibility to setup the Temp dir, is not possible by now. But i've just added in the todo list, thank you for your feedback!

regards, Miguel

Dislike

(0)

Like

(0)

rohit Rank: #16791 Posted on 2012-01-06

Hello Miguel, Problem I am facing is unique: - I can deploy the HTML To PDF eSpace and test the sample page HowToPDF properly. I can give it my URL and it generates the PDF nicely. The URL is my eSpace page which takes parameters and is made Public and Anonymus and IntegrationAuth is set to NO. - When I use the same Html to Pdf extension or the eSpace Action from my eSpace i get the error: "Could not find file 'C:\Windows\TEMP\TEMPLDIYVWHGWR.pdf'." I made sure that the folder'C:\Windows\TEMP\" has Modify access for the Network service. Thanks for your quick response. Please advise. Thanks Rohit

Dislike

(0)

Like

(0)

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2012-01-07

Hello Rohit, indeed that is strange, is it possible to share your eSpace with us, so we can take a look and if something, even a small thing, is wrong? also, the extension action have an output parameter that shows exactly the output message from the converting process, create an audit for that parameter and check Service Center for that audit and let us know what was the output. regards, Miguel

Dislike

(0)

Like

(0)

Wouter Schrandt Rank: #6625 Posted on 2012-04-16

HtmlToPdfConverter.oml Hello everyone, I've had some issues with finding the correct parameters and testing them. I found out that in the HowToPDF.aspx page, the other argumnents were not used... I have changed this in the OML and added some textual examples on the page to illustrate its usage. Especially the examples might be a nice additions for this converter. Kind regards, wouter

Dislike

(0)

Like

(0)

Kurt Vandevelde mvp_badge mvp_label Rank: #368 Posted on 2012-05-22

I'm trying to tuse the HTML to PDF Converter, but I run into some difficulties. I have a report screen where the user needs to select the report he wants:

After cliking "Report", an action is executed to fetch the data and it is show on screen via an ajax refresh:

How can I print only the result table to pdf and not all the rest? Thanks

Dislike

(0)

Like

(0)

J. mvp_badge mvp_label Rank: #6 Posted on 2012-05-23

Hi, suggestions: 1. check out the @media print tag. I have no idea if html2pdf takes that into account/ 2. use an inputparameter of that screen that shows/hides stuff, so when you call the htmlpdf it hides certain elements. 3. create a custom report-page where you specifically setup your pdf-stuff. I use 3 mostly, because I then also can setup page-breaks properly and styling is much different. no background-image. TOC, etc.

Dislike

(0)

Like

(1)

Gerry Rank: #110 Posted on 2012-05-23

Kurt Vandevelde wrote:

I'm trying to tuse the HTML to PDF Converter, but I run into some difficulties. I have a report screen where the user needs to select the report he wants:

After cliking "Report", an action is executed to fetch the data and it is show on screen via an ajax refresh:

How can I print only the result table to pdf and not all the rest? Thanks

Create a separate, anonymous page with that information and all of the input parameters you need to make it a stand-alone page and use that to generate your PDF.

Dislike

(0)

Like

(0)

João Carvalho Rank: #8734 Posted on 2012-06-29

rohit wrote:

Hello Miguel, Problem I am facing is unique: - I can deploy the HTML To PDF eSpace and test the sample page HowToPDF properly. I can give it my URL and it generates the PDF nicely. The URL is my eSpace page which takes parameters and is made Public and Anonymus and IntegrationAuth is set to NO. - When I use the same Html to Pdf extension or the eSpace Action from my eSpace i get the error: "Could not find file 'C:\Windows\TEMP\TEMPLDIYVWHGWR.pdf'." I made sure that the folder'C:\Windows\TEMP\" has Modify access for the Network service. Thanks for your quick response. Please advise. Thanks Rohit

Hi Rohit, Have you found any way to solve this issue? I think I'm having the same problem. I have my espace working in dev exporting correctly to PDF, then in production I'm getting the same error as you. The example in OML posted above in production works like a charm. I think the issue is somewhat related to the DB because I've deleted the application and redeployed it (off course having a DB backup). The application started without data but now I was abble to export to PDF. Restored the DB and issue came back. Anyone have any idea about this? Where can I start looking for reasons to this strange behaviour?

Best regards, João Carvalho

Dislike

(0)

Like

(0)

António Chinita Rank: #15 Posted on 2012-06-30

Hi guys. Just thought I'd share a solution to a problem I had. I was using the parameters to generate a Header through all document pages. This header had an image, that for some reason was showing only sometimes (even with the exact same parameters). Since the problem was totally random (same parameters, sometimes worked, sometimes didn't), I assumed it must be a problem with the built-in exe of the extension, so not much to do about it. I even tried setting a border to the image, and verified that when the image didn't show, the border was still there. So clearly a rendering problem with the wkhtmltopdf.exe. Solution: iFrame instead of image object! (Somehow this solves the rendering problem) "<iframe src='img/logoHeader.jpg' style='border: none; width: 111px; height: 110px ;' scrolling='no'>"

Hope it helps some people facing the same problem. P.S. This is possibly the biggest thread in the forum, so clearly this is one of the most used/useful components. It would be nice to see people implementing all the avaliable parameters (A LOT of them) as Inputs. No need to fiddle around with C#, good old Outsystems development in the provided eSpace will do the job, so everyone is able to contribute :-)

Dislike

(0)

Like

(0)

Sagar Nannaware Rank: #4342 Posted on 2012-07-30

Hi, I am using this component to convert my page to pdf. Once pdf successfully created, I am storing this file in an entity. Now I want to print this pdf file, anybody knows how to do it?

Thanks, Sagar Nannaware

Dislike

(0)

Like

(0)

Gerry Rank: #110 Posted on 2012-07-30

Sagar Nannaware wrote:

Hi, I am using this component to convert my page to pdf. Once pdf successfully created, I am storing this file in an entity. Now I want to print this pdf file, anybody knows how to do it?

Thanks, Sagar Nannaware

Use the "Download"component and point it to your binary field.

Dislike

(0)

Like

(1)

Pedro Miranda Rank: #11239 Posted on 2012-12-11

Hi, everyone! I'm using this extension with the action "GeneratePDF" so i can transform a table i generate into PDF. While this table as strings and integers it works fine and i get a spitting image of the web screen into the generated PDF. The problem is when instead of integers i use decimals, and any line where there is a decimal number is completly ignored...any ideas on a solution? I've checked the table and if i don't use "GeneratePDF" action the table appears correct. Thanks!

Dislike

(0)

Like

(0)

Pedro Miranda Rank: #11239 Posted on 2012-12-20

Hmmm, 9 days and not a single response...not even from the staff, things must be really busy with the hollidays. Anyway, anyone knows if it's possible to select the pdf's page orientation? i wanted to try to print my table in landscape.

Dislike

(0)

Like

(0)

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2012-12-20

Pedro Miranda wrote:

Hi, everyone! I'm using this extension with the action "GeneratePDF" so i can transform a table i generate into PDF. While this table as strings and integers it works fine and i get a spitting image of the web screen into the generated PDF. The problem is when instead of integers i use decimals, and any line where there is a decimal number is completly ignored...any ideas on a solution? I've checked the table and if i don't use "GeneratePDF" action the table appears correct. Thanks!

Hi there Pedro! Sorry for the late reply... It's not because holidays, but indeed things are busy here! :) Thats a strange behaviour, I would suggest you that, for exporting convert decimal to text in screen preparation. What kind of tests had you already done to find a solution? I'll try to investigate a little bit more, and I'll touch base here if I find any possible solution. Cheers, Miguel

Dislike

(0)

Like

(0)

Pedro Miranda Rank: #11239 Posted on 2012-12-20

Hi Miguel! I believe you :) on the following day i gave up and decided to convert to text on the screen and it did the trick. By the way, about the orientation of the page, is it possible to choose landscape page? Meanwhile i found this at the wkhtmltopdf manual, so that's why i'm asking. -O, --orientation Thanks and wishes of happy holidays! Best regards, Pedro

Dislike

(0)

Like

(0)

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2012-12-20

Pedro Miranda wrote:

Hi Miguel! I believe you :) on the following day i gave up and decided to convert to text on the screen and it did the trick. By the way, about the orientation of the page, is it possible to choose landscape page? Meanwhile i found this at the wkhtmltopdf manual, so that's why i'm asking. -O, --orientation Thanks and wishes of happy holidays! Best regards, Pedro

Hi there! yes it's possible to change page orientation with that argument.

--orientation Landscape Let us know how it goes! cheers, Miguel

Dislike

(0)

Like

(0)

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2012-12-20

Pedro Miranda wrote:

Hi Miguel! I believe you :) on the following day i gave up and decided to convert to text on the screen and it did the trick. By the way, about the orientation of the page, is it possible to choose landscape page? Meanwhile i found this at the wkhtmltopdf manual, so that's why i'm asking. -O, --orientation Thanks and wishes of happy holidays! Best regards, Pedro

Hi there! yes it's possible to change page orientation with that argument. --orientation Landscape Let us know how it goes! cheers, Miguel

Dislike

(0)

Like

(0)

Pedro Miranda Rank: #11239 Posted on 2012-12-20

And where is that argument passed? in the OtherArgs? Everytime i try doing something like "--orientation Landscape" in this, it gives an error saying 'Could not find file 'C:\Windows\TEMP\\TEMP....' How is this used?

Dislike

(0)

Like

(0)

Gonçalo Martins mvp_badge mvp_label Rank: #47 Posted on 2012-12-21

Hi Pedro, The arguments are passed exactly where you said. Without more information, I can guess that your problem is related with one of two issues. First, you should check if the folder indicated in the error exists in the server. After that, you should check the access permissions to that folder. If not you can grant full access or for example create an user with specific permissions to run the application and then configure that user in the Service Center in the "Run As" property. If is not this, please give us more information about what you're doing, or even a oml with it. Kind Regards, Gonçalo Martins

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Pedro Miranda Rank: #11239 Posted on 2012-12-21

Hi Gonçalo, i've got it now, probably some permission problem or some glitch, it's working pretty good. Thanks you and Miguel for your help. Best regards, Pedro Miranda

Gonçalo Martins mvp_badge mvp_label Rank: #47 Posted on 2012-12-21

Good to know that my tips helped you.. This kind of issues are very common when you have to access the file system.. Kind Regards, Gonçalo Martins

Raghunath Senthamaraikannan Rank: #12313 Posted on 2013-02-08

Hello guys, This feature has been a wonderful addition to our web applications. But we are running into trouble with IE9. when a user clicks a button to download the pdf, the little yellow pop-up at the bottom for the screen that asks whether you want to download this pdf just flashes for a sec and disappears. Works fine if we run in compatibility mode. Any thoughts on how this could be addressed without having to run in compatibility mode? Kind Regards, Raghu Kannan

Dislike

(0)

Like

(0)

Geraldine Ablaza Rank: #2851 Posted on 2013-02-08

I'm having difficulty using the extension. I have a WebScreen formatted for my report. I'm having difficulties showing variables/parameters of my report. I have tried showing a Session but it still returns a blank value once downloaded as a pdf. Viewing it through the WebScreen renders correctly and has correct values. What can I do with this? I hope you could help me. :)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

J. mvp_badge mvp_label Rank: #6 Posted on 2013-02-08

It will render with a different thread, so no session variables are available for that. If you still cannot get it to work, please attach a simple oml where it does not work

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2013-02-08

Geraldine Ablaza wrote:

I'm having difficulty using the extension. I have a WebScreen formatted for my report. I'm having difficulties showing variables/parameters of my report. I have tried showing a Session but it still returns a blank value once downloaded as a pdf. Viewing it through the WebScreen renders correctly and has correct values. What can I do with this? I hope you could help me. :)

Hi Geraldine, as Statler & Waldorf said, you can't read session vars in the screen, but you can create input variables in that screen, so when you call the action to create the pdf, you will create the URL containing the parameters. Makes sense to you? Let us know. Cheers, Miguel

Dislike

(0)

Like

(0)

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2013-02-08

Raghu Kannan wrote:

Hello guys, This feature has been a wonderful addition to our web applications. But we are running into trouble with IE9. when a user clicks a button to download the pdf, the little yellow pop-up at the bottom for the screen that asks whether you want to download this pdf just flashes for a sec and disappears. Works fine if we run in compatibility mode. Any thoughts on how this could be addressed without having to run in compatibility mode? Kind Regards, Raghu Kannan

Hi Raghu, that sounds like a security issue with IE, I once had a similar problem, not wih this extension but with an automatic download process, that IE assumed as a potencial risk file. I'll try to figure out a solution for this. Cheers, Miguel

Dislike

(0)

Like

(0)

Raghunath Senthamaraikannan Rank: #12313 Posted on 2013-02-11

Thank you, Miguel. A solution would be great as more and more people start using IE 9 it might become a potential production outage for us. Cheers, Raghu Kannan

Dislike

(0)

Like

(0)

Geraldine Ablaza Rank: #2851 Posted on 2013-02-12

Thank you, Kelter and Statler & Waldorf for the help. I have figured out that I was passing a Session variable and my URL sent has certain errors that's why I am getting a .pdf file that won't open.

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Eduardo Luís Rank: #125 Posted on 2013-02-12

Great component! Is there any java version of it?

J. mvp_badge mvp_label Rank: #6 Posted on 2013-02-15

Eduardo Luís wrote:

Great component! Is there any java version of it?

Yes, a java version would be awesome :)

Joop Stringer Rank: #114 Posted on 2013-04-19

Kelter wrote:

to set the "Run As" option you need to go to Service Center, HtmlToPdfConverter espace then Operation tab, and there you set it.

To come back on one of the previous posts unfortunately "Operations" tab is not available in Community Edition :-( And if creating a PDF from my application it is working. If running it through a timer ... it generates the errors : Message:

Could not find file 'C:\Windows\TEMP\TEMPEIFHMSYFYP.pdf'.

Stack:

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.IO.File.ReadAllBytes(String path) at OutSystems.NssHtmlConvertToPdf.CssHtmlConvertToPdf.MssGeneratePDF(String ssURL, String ssProxy, String ssOtherArgs, Byte[]& ssPDFBinary, String& ssMessageOutput) at ssmyPracticeHTML2PDF.RssExtensionHtmlConvertToPdf.MssGeneratePDF(HeContext heContext, String inParamURL, String inParamProxy, String inParamOtherArgs, Byte[]& outParamPDFBinary, String& outParamMessageOutput)



Dislike

(0)

Like

(0)

João Inácio Rank: #599 Posted on 2013-04-24

Joop Stringer wrote:

Kelter wrote:

to set the "Run As" option you need to go to Service Center, HtmlToPdfConverter espace then Operation tab, and there you set it.

To come back on one of the previous posts unfortunately "Operations" tab is not available in Community Edition :-( And if creating a PDF from my application it is working. If running it through a timer ... it generates the errors : Message:

Could not find file 'C:\Windows\TEMP\TEMPEIFHMSYFYP.pdf'.

Stack:

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.IO.File.ReadAllBytes(String path) at OutSystems.NssHtmlConvertToPdf.CssHtmlConvertToPdf.MssGeneratePDF(String ssURL, String ssProxy, String ssOtherArgs, Byte[]& ssPDFBinary, String& ssMessageOutput) at ssmyPracticeHTML2PDF.RssExtensionHtmlConvertToPdf.MssGeneratePDF(HeContext heContext, String inParamURL, String inParamProxy, String inParamOtherArgs, Byte[]& outParamPDFBinary, String& outParamMessageOutput)



The only way i solve this was not passing in the URL parameter the "www", On my case i always send "http://localhost/..." or machine IP or other domain without "www"

Dislike

(0)

Like

(0)

Joop Stringer Rank: #114 Posted on 2013-04-24

João Inácio wrote:

On my case i always send "http://localhost/..." or machine IP or other domain without "www"

Changed it, will keep you posted :-)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Joop Stringer Rank: #114 Posted on 2013-04-26

Localhost worked like a charm : no more errors Probably in combination wth the access settings for Network account

João Inácio Rank: #599 Posted on 2013-04-26

glad to know!

Ricardo Lopes Rank: #175 Posted on 2013-06-05

Hey guys. Have your ever tried to add a table of contents to pdf with this extension? I tried and I already have the TOC there but it doesn't have any content (except the "Table of Contents" entry). I set some titles as "Heading1" in my webpages but no lucky. Any ideas? Thanks. Ricardo

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Ricardo Lopes Rank: #175 Posted on 2013-06-07

please, help!

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2013-06-10

Well, if I had to make a wild guess, it's not possible to do that.

Ricardo Lopes Rank: #175 Posted on 2013-06-10

I tried with a different tool (http://pdfcrowd.com/) and it worked. Same page (built with outsystems).

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2013-06-10

As you say, it's a different tool. Different tool do different things.

Ricardo Lopes Rank: #175 Posted on 2013-06-10

Ok, I thought you were saying that is impossible to do at all. But it is not as we can see with this online tool. Did you tried other components on forge?

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2013-06-10

I've only tried this one with regards to HTML to PDF conversion. However, keep in mind that it is just a wrapper around a 3rd party product, and that question such as this can better be directed directly at the source of it.

Dislike

(0)

Like

(0)

Gino Quetua Rank: #1008 Posted on 2013-11-27

António Chinita wrote:

Hi guys. Just thought I'd share a solution to a problem I had. I was using the parameters to generate a Header through all document pages. This header had an image, that for some reason was showing only sometimes (even with the exact same parameters). Since the problem was totally random (same parameters, sometimes worked, sometimes didn't), I assumed it must be a problem with the built-in exe of the extension, so not much to do about it. I even tried setting a border to the image, and verified that when the image didn't show, the border was still there. So clearly a rendering problem with the wkhtmltopdf.exe. Solution: iFrame instead of image object! (Somehow this solves the rendering problem) "<iframe src='img/logoHeader.jpg' style='border: none; width: 111px; height: 110px;' scrolling='no'>"

Hope it helps some people facing the same problem. P.S. This is possibly the biggest thread in the forum, so clearly this is one of the most used/useful components. It would be nice to see people implementing all the avaliable parameters (A LOT of them) as Inputs. No need to fiddle around with C#, good old Outsystems development in the provided eSpace will do the job, so everyone is able to contribute :-)

Hi Antonio, Can you please share an example of what you did here? I can't seem to do it (sorry), I was planning to have a standard image for the headers and footers on every page.

Thanks in advance, Gino

Dislike

(0)

Like

(0)

JD Rank: #4736 Posted on 2013-12-12

Hi, I am using the GeneratePDFfunction and in othere arguments i was just passing "-s" for testing purpose but it is giving me an error 'C:\Windows\TEMP\TEMPEIFHMSYFYP.pdf'. i want to print my page in landscape mode How to achive that?

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2013-12-12

Make sure the user has the right to access c:\windows\temp.

Vivek Ghiria Rank: #6196 Posted on 2013-12-13

JD has acces to c:\windows\temp. Please suggest

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2013-12-13

Does the error message contain solely the file name? Or is there some error code or message as well?

Dislike

(0)

Like

(0)

JD Rank: #4736 Posted on 2013-12-16

Vivek Ghiria wrote:

JD has acces to c:\windows\temp. Please suggest

Well i have access to the Path you have mentioned. one more thing if i keep the otherArg blank then it is generating the out put but as i said i want the page in the landscape mode.



Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(1)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(2)

Dislike

(0)

Like

(0)

J. mvp_badge mvp_label Rank: #6 Posted on 2014-04-01

I noticed there is some activity again. http://wkhtmltopdf.org/ They even released 0.12!

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2014-04-04

Hi there! version 1.0.4 is out. I've upgraded wkhtmltopdf to version 0.12.0. Cheers, Miguel

J. mvp_badge mvp_label Rank: #6 Posted on 2014-04-07

\o/

Joop Stringer Rank: #114 Posted on 2014-04-07

Miguel, Did you also adjusted the XIF so that the tempfiles are deleted ...

Miguel 'Kelter' Antunes mvp_badge mvp_label Rank: #18 Posted on 2014-04-07

Yes, in version 1.0.5 :) Added that feature in this last version! Cheers, Miguel

Joop Stringer Rank: #114 Posted on 2014-04-08

Thanks !!!

Carlos Henriques Rank: #50 Posted on 2014-07-29

version 0.12.1 of wkhtmltopdf was released: This release has a lot of changes/bug fixes and brings back OS X support due to the efforts of @mn4367. removed support for PostScript output which is not supported in QT5 use OpenSSL 1.0.1h for the Windows builds #1502: fix spurious "exit with code 1 due to http error: 1xxx" errors #1504: [qt] fix rendering issues for JPEG with XMP metadata #1507: [qt] fix crash when CSS widows are specified #1509: fix TOC support which was broken after upgrade to latest Qt #1512: [qt] fix crashes when rendering JPEG images on Windows Server 2008 x64 #1544: use UTF-8 encoding for the HTML generated by the TOC XSL #1545: PDFs rendering without embedded fonts on OS X #1546: fix problem with non-ASCII characters in output path on Windows #1585: delete existing files explicitly in windows installer #1586: [qt] suppress blank page generated if the first cell spans multiple pages #1631: [qt] crash when hiding header for a specific page #1686: [qt] --user-style-sheet does not work on Windows #1757: fix parsing of ColorMode and PrinterMode in the API #1764: include text codecs for Chinese (Simplified/Traditional), Japanese and Korean fix compilation failures when not building with patched Qt/WebKit support building with non-patched Qt4/Qt5 in either shared or static mode implement a --license command line option update URLs in the internal documentation generate API documentation for libwkhtmltox (on the website) display version in compiled binary properly under various scenarios complete revamp of the build system, which now generates native packages on all platforms Binaries for all platforms are available from the website. It is recommended for all users of 0.12.0 to upgrade to 0.12.1 immediately.

https://github.com/wkhtmltopdf/wkhtmltopdf/releases/tag/0.12.1

Dislike

(0)

Like

(0)

Cory Creamer Rank: #1553 Posted on 2014-09-09

I also was running into the c:\windows\temp access issue in production. Another vote for chaning the URL path that is passed to the HTMLtoPDF action to be http://localhost/.... We were using a site property to determine the domain and it was causing problems. In development it worked fine because we had the site property set to the IP of the development machine. In production I had to change it to localhost and it worked just fine. Cory

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Diogo Capitão Pedrosa Rank: #394 Posted on 2014-10-03

Hello everyone. Platform Charts (HTML 5) are not displayed in the PDF generated by extension. Anyone know how to solve this situation? Thanks.

ingaponteca Rank: #3217 Posted on 2014-10-07

I am trying to use htmltopdf to create a pdf for my dashboard that have multiple pie charrs and other but pdf exports all but the graphs. Any sugestion or restriction doing it?

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

J. mvp_badge mvp_label Rank: #6 Posted on 2014-10-08

I think you need to convert the chart first to an image. check highcharts api to make it a image first then use that in the html2pdf http://www.highcharts.com/docs/export-module/export-module-overview

Guilherme Pereira Rank: #7 Posted on 2014-10-14

Hi Guys, i've just uploaded a new version 1.0.6 (still marked as under development). On this new version the main change is the added support for the JAVA stack. In order to support this stack I've created a mechanism on which the Html2PDFAdmin user must upload the necessary binaries (they come in all flavours from wkhtmltopdf site) and so the binaries are no longer packed inside the extension. This mechanism also gives you the flexibility under the windows environment to use the wkhtmltopdf version you prefer (they have the mingw based version and the msvc2013 recommended version). For those upgrading from a previous version if you were using the extension module actions directly you should now change them to use the actions from the espace (they have the exact same signature so it should just be a matter of search and replace). Also check the installation instruction where all these steps are detailed one by one. Please use this thread if you have questions or face any issues with this new version. Cheers, Guilherme

Dislike

(0)

Like

(0)

Carlos Henriques Rank: #50 Posted on 2015-01-06

Hi Guilherme. Version 1.0.6 needs a little improvement. If the application fails to create the binaries folder and copy the binary, the eSpace does not show any error message and assumes that everyting is OK. The required binaries, like PDF Generator is showned with a check but the only thing that happened was the record creation in the database. There is no error processing and no insert\update rollback. This can fail if the user that is being used by the web application does not have permission to creat folders and files, wich normally doesn't. The Administration area could have some fields to input the username and password to use for this operation, otherwise I need to set the Run As property of the HtmlToPdfConverter eSpace, so it can run with a user with the needed permissions.

Dislike

(0)

Like

(1)

Guilherme Pereira Rank: #7 Posted on 2015-01-06

Hi Carlos, Regarding the first part of your feedback I agree. The errors can be better handlet and the BO can be improved in case of error. I'll do it when I have some spare time. Regarding the 2nd part are you facing the same error Leonardo did (http://www.outsystems.com/forums/discussion/13467/error-uploading-binaries-in-administration-page/)? What's your platform version and OS? Cheers

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Pedro Gonçalves Rank: #22 Posted on 2015-01-06

Please also add farm-architecture-support to the backlog.

Carlos Henriques Rank: #50 Posted on 2015-01-07

Guilherme Pereira wrote:

Hi Carlos, Regarding the first part of your feedback I agree. The errors can be better handlet and the BO can be improved in case of error. I'll do it when I have some spare time. Regarding the 2nd part are you facing the same error Leonardo did (http://www.outsystems.com/forums/discussion/13467/error-uploading-binaries-in-administrationpage/)? What's your platform version and OS? Cheers

Outsystems Platform 8.0.1.31 and Windows Server 2008

Dislike

(0)

Like

(0)

Guilherme Pereira Rank: #7 Posted on 2015-01-12

Hi Guys, I've uploaded a new version 1.0.8 with a few new features (specially support for farm configurations). I marked it as under development as currently I don't have access to a farm environment to test it properly. I wasn't able to reproduce the lack of permissions issue so if someone is willing to help me troubleshoot it (in case you face it) I'd apretiate it. Cheers, Guilherme

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Like

(0)

Like

(0)

Carlos Monteiro Rank: #3777 Posted on 2015-01-13

Guilherme, Can you launch a v8 version? Thanks

Guilherme Pereira Rank: #7 Posted on 2015-01-14

Hi Carlos, I'm currently not maintaining the "old" version because I simply don't have the bandwith. Sorry :( Cheers, Guilherme

TamiB Rank: #18575 Posted on 2015-01-14

same here, very satisfied with it, thank you Cheers, Tami

Carlos Henriques Rank: #50 Posted on 2015-01-16

I was getting an error using the GeneratePDF action: Could not find file 'C:\Windows\TEMP\TEMPFRDUKFWTUO.pdf'.

I tought it was something related to permissions, but nothing worked. SOLUTION: - Install the Microsoft Visual C++ 2013 Redistributable that is bundled with the wkhtmltox setup.

Dislike

(0)

Pedro Lopes Rank: #11422 Posted on 2015-01-21

Does anyone know a solution for rendering the Platform Charts with the highcharts export api. Thanks in advance :)

Dislike

(0)

Joseph Foster Rank: #6700 Posted on 2015-06-20

problem 1) Has anyone run this in the commnuity online v9 platform? The solutions for 0kb seem to be for local instances.Error:.Could not find file problem 1 Update:) Solved. You cant use msvc version, you have to use mingw version problem 2): The pdf is being generated, but its not including page content (label content, text box etc. I am missing domething obvious I am meant to be doing?

Dislike

(0)

Like

(0)

Guilherme Pereira Rank: #7 Posted on 2015-06-20

Precisely Joseph and this is also a note to anyone using a cloud infrastructure (personal or enterprise). On those scenarios you need to use the mingw version as the cloud machines do not have msvc 2013. Cheers, Guilherme

Dislike

(0)

Like

(0)

Joseph Foster Rank: #6700 Posted on 2015-06-20

thanks for the note. any suggestions why labels content and text box content are not being included in the pdf?

Dislike

(0)

Like

(0)

Joseph Foster Rank: #6700 Posted on 2015-06-23

Joseph Foster wrote:

thanks for the note. any suggestions why labels content and text box content are not being included in the pdf?

Update: i couldnt figure our using the htmltopdf using local form elements so I gave up and went back to using the database which works fine but was not needed as i just need to send the pdf out not persist / store the values.

Dislike

(0)

Like

(0)

JC Elorde Rank: #900 Posted on 2015-08-21

Hi All, I ran through most of the comments here and it seems that the PDF generation has been an issue way back and until now it got it: The system cannot find the file specified at ssHtmlToPdfConverter.RssExtensionHtmlConvertToPdf.MssGeneratePDFExtension(HeContext heContext, String inParamExecutablePath, String inParamURL, String inParamProxy, String inParamOtherArgs, Byte[]& outParamPDFBinary, String& outParamMessageOutput) at ssHtmlToPdfConverter.Actions.ActionGeneratePDF(HeContext heContext, String inParamURL, String inParamProxy, String inParamOtherArgs, Byte[]& outParamPDFBinary, String& outParamMessageOutput) at ssHtmlToPdfConverter.Actions.ActionHtmlToPdfConverter(HeContext heContext, String inParamURL, String inParamWhereToAddPageNumber, String inParamOtherArgs, Byte[]& outParamBinary, Boolean& outParamError) I am not sure if I missed the solution but can you please help me on this? NOTE: I am still just using the sample page (OML) for this. And even on that, there is already the error.

Dislike

(0)

Like

(0)

JC Elorde Rank: #900 Posted on 2015-08-21

Joseph Foster wrote:

problem 1) Has anyone run this in the commnuity online v9 platform? The solutions for 0kb seem to be for local instances.Error:.Could not find file problem 1 Update:) Solved. You cant use msvc version, you have to use mingw version problem 2): The pdf is being generated, but its not including page content (label content, text box etc. I am missing domething obvious I am meant to be doing?

I actually used the MinGW version but still The system cannot find the file specified and the PDF generated is 0 bytes.

Dislike

(0)

Like

(0)

Dislike

(0)

Like

(0)

Conwell Nkuna Rank: #6260 Posted on 2016-08-30

Screenshot 2016-08-30 14.06.23.png Can Someone help?

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2016-08-30

Yeah. Use Alt-PrtScr instead of PrtScr for screen dumps! Alternatively, and ideally, apart from a screen dump actually write what problem you encounter, it's more user friendly. Also, we don't know what you've alread tried. In your screen shot, there's even a possible solution to your problem. Did you try what has been suggested there? Etc.

Dislike

(0)

Like

(0)

Conwell Nkuna Rank: #6260 Posted on 2016-08-30

I did try the " --load-error-handling ignore" as suggested but it print an empty pdf.

Could not find file 'C:\Users\ETBA59~1\AppData\Local\Temp\TEMPISJBMTXSHB00000000000000000000000000000000.pdf '. SetProcessDpiAwareness failed: "COM error 0xffffffff80070005 (Unknown error 0x0ffffffff80070005)" Error: Failed loading page https:// (sometimes it will work just to ignore this error with --load-error-handling ignore) Exit with code 1, due to unknown error.

DOn't know what I did wrong

Dislike

(0)

Like

(0)

(0)

Like

(0)

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2016-08-30

Are you sure that IIS can read that location? It seems the TEMP directory of a local user?

Dislike

Conwell Nkuna Rank: #6260 Posted on 2016-08-30

Kilian Hekhuis wrote:

Are you sure that IIS can read that location? It seems the TEMP directory of a local user?

I don't think I understand what u mean?

Dislike

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2016-08-30

Hi Conwell, please try reading this thread starting from here. It's about permissions, the RunAs user, and possibly authentication method, etc. If you've followed/checked everything mentioned there, it should work. If not, report back.

Dislike

(0)

Like

(0)

Conwell Nkuna Rank: #6260 Posted on 2016-09-02

Kilian Hekhuis wrote:

Hi Conwell, please try reading this thread starting from here. It's about permissions, the RunAs user, and possibly authentication method, etc. If you've followed/checked everything mentioned there, it should work. If not, report back.

I still can't workaroud that Error.

I'm starting to think that maybe it has to do with the app being Multi Tenant.

Can that be the cause of this error?

Could not find file 'C:\Users\ETBA59~1\AppData\Local\Temp\TEMPISJBMTXSHB00000000000000000000000000000000.pdf '. SetProcessDpiAwareness failed: "COM error 0xffffffff80070005 (Unknown error 0x0ffffffff80070005)" Error: Failed loading page https:// (sometimes it will work just to ignore this error with --load-error-handling ignore) Exit with code 1, due to unknown error.

Because I tried deleting and re-uploading the exe file and run As but I don't know why its looking in the folder

'C:\Users\ETBA59~1\AppData\Local\Temp\TEMPISJBMTXSHB00000000000000000000000000000000.pdf '.

instead of %win%temp%

Isn't there another component I can use to convert html to pdf ?

I tried using the jsPDF plugin but it has so many exclusions.

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2016-09-02

jsPDF is not very good for this purpose, and it is client-side, not server-side (which has some drawbacks). As an alternative to wkhtmltopdf.exe, you could try PhantomJS, but you'll either need to create an extension by yourself, or modify this one to work with PhantomJS. Also, you might run into the same problems with regards to privileges.

Dislike

(0)

Like

(0)

Conwell Nkuna Rank: #6260 Posted on 2016-09-13

Kilian Hekhuis wrote:

jsPDF is not very good for this purpose, and it is client-side, not server-side (which has some drawbacks). As an alternative to wkhtmltopdf.exe, you could try PhantomJS, but you'll either need to create an extension by yourself, or modify this one to work with PhantomJS. Also, you might run into the same problems with regards to privileges.

Hi kilian

I managed to generate pdf files using the html2pdf component at last.

I had to create a printable screen that uses none related Silk UI theme and widgets

But now I have an issue, The PDF i print doesn't get the data from the server.

The pdf come with the widgets but no data on it. like I said before, The app is multi tenancy. I used tenant switch to isolate data between tenants.

But The page that get page that gets printed is this:

No data on it,

Is it the multi tenancy maybe ?

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2016-09-13

Very likely, yes. When you call html2pdf with the URL from your page, you must make sure the right tenant is known. I'm not sure what the best way is to do this, as I've never used multi-tenancy.

Dislike

(0)

Like

(0)

Justin James mvp_badge mvp_label Rank: #4 Posted on 2016-09-14

Suggest you do the following: All calls to a page for this should be made using a single unique, random ID (like a GUID) that your screen can use to look up some saved parameters somewhere like the tenant, recored you need to retreive, etc. This will provide security to your screen in case someone else pulls it up. Make your entity a single tenant entity so it always finds the data, then once you do the look up, do tenant switch to the right tenant and perform the rest of the queries. J.Ja

Dislike

(0)

Like

(1)

Conwell Nkuna Rank: #1162 Posted on 2016-09-14

Justin James wrote:

Suggest you do the following: All calls to a page for this should be made using a single unique, random ID (like a GUID) that your screen can use to look up some saved parameters somewhere like the tenant, recored you need to retreive, etc. This will provide security to your screen in case someone else pulls it up. Make your entity a single tenant entity so it always finds the data, then once you do the look up, do tenant switch to the right tenant and perform the rest of the queries. J.Ja

The Issue now is I didn't make the espace multi tenant but only some entities. I even tried filtering through the data using the session.tenantId but with no success. should I pass the Guid as input in my printable screen or ?

Dislike

(0)

Like

(0)

Justin James mvp_badge mvp_label Rank: #4 Posted on 2016-09-14

1. It doesn't matter if the eSpace is multi tenant or just some entities. A "multi tenant" eSpace is no different from a single tenant eSpace, other than setting defaults for stuff. 2. How are you filtering by tenant ID on entities that are multi-tenant? Did you expose the tenant ID? If so, you don't need to do a tenant switch. 3. Yes, pass the GUID in to the printable screen. Again, the idea here is to make an entity that stores the parameters that you would normally pass to the screen. why? Because the printable screen MUST have "anonymous" be allowed to access the screen (Html2Pdf can't login). That means that anyone who figures out the URL can pass in different IDs to parameters and see things that they probably should not view. By using a single random ID like a GUID, and using that to look up the actual parameters, you make it hard for an attacker to be able to get to data like this... and if you delete that parameter record at the end of the Preparation so it is a one-time use value, you make the system that much stronger. J.Ja

Dislike

(0)

Like

(2)

Saulo Gonçalves Rank: #8739 Posted on 2016-12-19

This component works with Outsystems 10 Free version? I've got same "Temp" error related above.

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2016-12-19

Saulo, I don't think you have access to the local file system in the free cloud, so I am tempted to say it indeed doesn't work.

Dislike

(0)

Like

(0)

Like

(1)

Guilherme Pereira Rank: #7 Posted on 2016-12-19

Saulo Gonçalves wrote:

This component works with Outsystems 10 Free version? I've got same "Temp" error related above.

Yes it does. You can refer to the FAQ for troubleshooting options. Please note that this will only work for web applications and not for mobile applications. Cheers, Guilherme

Dislike

(0)

shanmuk sandeep Rank: #3656 Posted on 2017-05-16

wallace stephen wrote:

Spire.DataExport Comunity is a Free Component which can export data from database to PDF and other popular file formats... but not support file conversion...

i AM USING CHARTS . Will it create any problem ??

Dislike

(0)

Like

(0)

Kilian Hekhuis mvp_badge mvp_label Rank: #11 Posted on 2017-05-17

Shanmuk, As you can read in this very thread, this question has been asked multiple times. As far as I can see, it is not possible to render charts with this component.

Dislike

(0)

Like

(0)

shanmuk sandeep Rank: #3656 Posted on 2017-05-17

Kilian Hekhuis wrote:

Shanmuk, As you can read in this very thread, this question has been asked multiple times. As far as I can see, it is not possible to render charts with this component.

Hi Kilian, I have a screen with charts and tabular data. How can i download that screen as a report. If HTML to PDF wont work with this case which widget i need to use. Can you clarify please.

Regards, Shanmuk

Dislike

(0)

Like

(0)

Like

(0)

Cristina Sandor Rank: #23144 Posted on 2017-07-11

Hello! Anybody knows why there are some extra blank pages generated and how to avoid that? Thanks!

Dislike

Company

Support

Corporate Site

Technical Support

Contacts

Community Forums

(0)





OutSystems© All rights reserved. Custom built with



and

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.