Git Product home page Git Product logo

Comments (3)

craig-davis avatar craig-davis commented on August 19, 2024 1

I don't think it can be set via CSS. I think instead it may need to be added here when it calls wkhtmltopdf: https://github.com/there4/markdown-resume/blob/master/src/Resume/Command/PdfCommand.php#L86

With the --page-size A4 option. This would be a great option to add, but for now you could try that out and see how it goes.

from markdown-resume.

GG-better avatar GG-better commented on August 19, 2024

Thanks a lot, @craig-davis !!!
You pointed me to the right code part! I played around with different options to wkhtmltopdf. Using the option --page-size A4 didn't solve the size issue mentioned above. However, a strong increase of the option --dpi (from 300 to 1800) solved the issue. Now the resume in the output pdf file is large enough. Finally, I used this code:
exec('wkhtmltopdf --dpi 1800 ' . $pdfSource .' ' . $destFilename);
Thank you,
GG

from markdown-resume.

danielklim avatar danielklim commented on August 19, 2024

I've addressed this issue in #84. If that PR is accepted, it will allow users to pass through arguments to the wkhtmltopdf engine instead of hardcoding PDF formatting in the PHP file. For example, for a PDF with 1in margins, Letter size and 300 dpi, the command would be invoked as something like:

md2resume pdf -k \
	--pdfargs="--dpi 300 -s Letter -T 1in -B 1in -L 1in -R 1in --print-media-type" \
	-t modern \
	./src/resume.md ./

from markdown-resume.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.