-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created PDF has content, but is displayed empty with all tested PDF viewers. #120
Comments
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. |
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?
The text was updated successfully, but these errors were encountered: