Open Michaelschnabel-DM opened 6 days ago
works for me
#[test]
fn simple_test() {
let content = std::fs::read("test/data/test.txt").unwrap();
let md_content = String::from_utf8(content).unwrap();
let input_bytes = Bytes::from(md_content);
let document = markdown::Transformer::parse(&input_bytes).unwrap();
let output_bytes = pdf::Transformer::generate(&document)
.unwrap()
.to_vec();
std::fs::write(
"test/data/test.pdf",
output_bytes,
).unwrap();
}
}
https://github.com/igumnoff/shiva/raw/HEAD/lib/test/data/test.txt
https://github.com/igumnoff/shiva/raw/HEAD/lib/test/data/test.pdf
how to reproduce?
Initially the small example test above didnt work either. Then i noticed that the fonts folder was completely empty. After deleting it and running the test it properly filled the fonts folder with all the fonts and also the PDF was fine again. Not sure if I broke anything on my side that caused the fonts to not be downloaded anymore, but now it works again thanks!
Hi I am using shiva e.g. to convert a Markdown File to a PDF file. The content of the PDF itself seems to be present, but when opened with any pdf viewer like adobe acrobat it displays only blank pages. I can even reproduce it with a very simple txt file.
I attached the simple text input file and below the resulting PDF. Test.txt
Test.pdf
Is this a known bug or am i doing something wrong?