Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author divinenephron

    (@divinenephron)

    There’s quite a lot of code shown in the FAQ; if that’s not enough for you, could you give a more detailed description of what you want to see?

    Thread Starter tikaylou

    (@tikaylou)

    Hi,

    Thanks for your reply, believe me, i read everything in FAQ!

    I just want to see how to generate a PDF document from a page. I saw the code in the FAQ but im not quite sure how to use it. I just need an example of the code that we should write in a page to generate a simple PDF. Let’s say, this simple example :

    % Example LaTeX document for GP111 – note % sign indicates a comment
    \documentstyle[11pt]{article}
    % Default margins are too wide all the way around. I reset them here
    \setlength{\topmargin}{-.5in}
    \setlength{\textheight}{9in}
    \setlength{\oddsidemargin}{.125in}
    \setlength{\textwidth}{6.25in}
    \begin{document}
    \title{LaTeX Typesetting By Example}
    \author{Phil Farrell\\
    Stanford University School of Earth Sciences}
    \renewcommand{\today}{November 2, 1994}
    \maketitle
    This article demonstrates a basic set of LaTeX formatting commands.
    Compare the typeset output side-by-side with the input document.

    taken from https://pangea.stanford.edu/computing/unix/formatting/latexexample.php

    I’ve worked a bit with LaTeX before, however I’m not sure how to implement it on WordPress.

    Thanks again!

    Plugin Author divinenephron

    (@divinenephron)

    Latex Everything has a default Latex template. I’m happy to tell you how to make your own, but I’d first like to check whether you’ve managed to create PDFs and link to them using the default template as described in the installation instructions?

    Thread Starter tikaylou

    (@tikaylou)

    Hi, thanks for you reply

    I am currently trying to figure out how to use “The Loop” (I’m new to WP platform… It is so much more complicated! I prefer without platforms!)

    1 – “This plugin requires pdflatex and pdftk installed. You can check for these by executing which pdflatex and which pdftk on your host.”

    How exactly can we check if we have them installed?

    2 – Link to the PDF version of a post by putting the following into The Loop:
    “>PDF Version

    Another question ; your plugin only put a post/page –> PDF? Or can we also create our own customized PDF like fpdf.org library?

    Thanks!

    Plugin Author divinenephron

    (@divinenephron)

    It sounds like you’re barking up the wrong tree with Latex Everything. What’s the original problem you’re trying to solve? If you’re trying to automatically generate PDFs of your blog, but don’t care whether you use Latex, there are simpler plugins to do that. If you’re trying to programatically generate PDFs of some other data outside WordPress, then neither WordPress nor any of its plugins are likely to help you, though I might be able to suggest some software that can.

    Thread Starter tikaylou

    (@tikaylou)

    Thanks for your answer again,

    My original problem is find a way to generate a customized PDF using PHP or LaTeX.

    I want to do something similar to fpdf.org (php library that outputs a customized PDF).

    I know that LaTeX can do that also, but somehow if I use my LaTeX code on WordPress, it will not work. (Probably because the latex functions are limited on wordpress.)

    Plugin Author divinenephron

    (@divinenephron)

    What are you trying to put into the PDF?

    Plugin Author divinenephron

    (@divinenephron)

    I ask because, based on the questions you’re asking, it sounds like you think Latex Everything does things it isn’t designed for. It also sounds like you’ll have to learn a lot of new things (how WordPress works, how Latex works, how to administer a Unix server) in order to make Latex Everything work, so using something simpler is likely to get you a faster and more reliable result. That’s why I asked “what’s the original problem” – if I know your original problem I can suggest something simpler. An “original problem” is something like “I want visitors to my website to be able to print my posts in a way that looks good”. “I want to create a PDF with PHP and Latex” is not an original problem, it’s a way of solving a problem, and for you I think it’ll be an unneccisarily difficult way to solve whatever you’re trying to do. So, what’s your original problem?

    Thread Starter tikaylou

    (@tikaylou)

    Oh, sorry for my unclear answer.

    My original problem would be to have users enter information in a form, and the input information would be organized in a specific way in a PDF form. For instance, you input items and prices, and it will output a PDF page with the bill (prices of each items + total amount).

    Plugin Author divinenephron

    (@divinenephron)

    Ok, I’m quite sure Latex Everything isn’t designed to do that, and trying to make it do that is unnecessarily complex. I’ll leave it up to you to decide whether or not WordPress will make your life easier. Writing a normal PHP (i.e. without WordPress) that does what you described is probably the best way to start in either case. Use the TCPDF library, since FPDF hasn’t been maintained since 2011. Learning to use the library is, of course, also up to you.

    Good luck.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Need an example’ is closed to new replies.