Skip to content
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

Change all println statements to dlog #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ impl<'a> PdfSimpleFont<'a> {
Entry::Vacant(v) => { v.insert(String::from_utf16(&be).unwrap()); }
Entry::Occupied(e) => {
if e.get() != &String::from_utf16(&be).unwrap() {
println!("Unicode mismatch");
dlog!("Unicode mismatch");
}
}
}
Expand Down Expand Up @@ -1557,7 +1557,7 @@ impl<'a> Processor<'a> {
if let Some(s) = s {
gs = s;
} else {
println!("No state to pop");
dlog!("No state to pop");
}
}
"gs" => {
Expand Down Expand Up @@ -1707,7 +1707,7 @@ impl<'a> HTMLOutput<'a> {
// get the length of one sized of the square with the same area with a rectangle of size (x, y)
let transformed_font_size = (transformed_font_size_vec.x * transformed_font_size_vec.y).sqrt();
let (x, y) = (position.m31, position.m32);
println!("flush {} {:?}", self.buf, (x,y));
dlog!("flush {} {:?}", self.buf, (x,y));

write!(self.file, "<div style='position: absolute; left: {}px; top: {}px; font-size: {}px'>{}</div>\n",
x, y, transformed_font_size, insert_nbsp(&self.buf))?;
Expand Down Expand Up @@ -1738,10 +1738,10 @@ impl<'a> OutputDev for HTMLOutput<'a> {
let position = trm.post_transform(&self.flip_ctm);
let (x, y) = (position.m31, position.m32);

println!("accum {} {:?}", char, (x,y));
dlog!("accum {} {:?}", char, (x,y));
self.buf += char;
} else {
println!("flush {} {:?} {:?} {} {} {}", char, trm, self.last_ctm, width, font_size, spacing);
dlog!("flush {} {:?} {:?} {} {} {}", char, trm, self.last_ctm, width, font_size, spacing);
self.flush_string()?;
self.buf = char.to_owned();
self.buf_font_size = font_size;
Expand Down